back link from details pages

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 24, 2012   (RSS)

Re: [rez] back link from details pages

By rez - January 24, 2012 - edited: January 24, 2012

oh... I just realized that these projects may be in multiple categories so in the second example coming from the homepage, I actually dont know what I want to link back to. I'm thinking the link should say view "full portfolio or select a category on the right" in that case and use the default /portfolio.php for the link.

The first example would still go back to the list page that was being viewed, page 4 in that example. Any solution here?

Some projects will be shared on facebook with a link or may be found in google so just going one page back isn't my favorite option. How do you suggest i do this? the history -1 code i have seen in the past?

Re: [rez] back link from details pages

By (Deleted User) - January 24, 2012

Hi Rez,

You can use $projectsRecord ['category'] to provide the category number to go back to for a 'back' link, for example:

<a href='listPage.php?<?php echo $projectRecord['category']; ?>'>Back To Category For This Item</a>

This will take you to the listPage with the category for that record selected.

Otherwise, to go back to the previous page you could just use a cookie to store the lastUrl then use the value of that cookie to create the link.

Hope that helps,

Tom