if else for previous page

4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 21, 2009   (RSS)

By eduran582 - July 18, 2009

How does one go about creating a "If, else" statement to show specific links based on the page that was displayed before the current page.

Here's what I'm trying to do:
If I arrived at the page I'm on now from "Page1.php" then show a url to return to page1.php; else return to adifferent.htm page.

Make sense? [crazy]

TIA!

Re: [eduran582] if else for previous page

By ross - July 20, 2009

Hi there

Thanks for posting!

I don't quite get what you are aiming for here. The if else should end up being quite straight forward once I've understood what you need.

Can you go over it again for me? Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] if else for previous page

By eduran582 - July 20, 2009

Hi Ross, thanks for answering!

I have two areas that contain (with minor differences) the same information. One is accessed by the public and one by the administrator. The search function works the same for both; the public from a single form element to search for an exact record; the admin search is from the "list" page using the "contains" variable. Search result shows the same information with the public search showing only one record and the admin search result showing one or more. Once a record is found, both can access it by clicking on a link contained in the record displayed. What I wanted to do is this:

When the public accesses the record via the link, they would have the option (a link) to return to a "main" and or back to the search page;
When the admin accesses the record via the link, they would have a link that would take them to the "list" page.

I don't want the public to be able to return to the list of all the records but only back to the main and/or search, page.

Don't worry if it's not a viable option as I have (at this point) simply made a duplicate "detail" page with the options for each. I was just trying to "streamline" the process.

Thanks again for the great support! [;)]

Eric