Manipulating "Back to list page" Link

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

By osga - July 18, 2012

Hello All!

In our article list page, the "Back to list page" takes you to the main list of articles....we would like the link to take the reader to the Category List of the article they were reading...irregardless of how they got to the article (i.e. - Google , etc.)

<a href="<?php echo $articlesMetaData['_listPage']; ?>">&lt;&lt; Back to list page</a>

Any thoughts or suggestions would be helpfull....

Re: [osga] Manipulating "Back to list page" Link

By Jason - July 18, 2012

Hi,

No problem. What I would suggest is manually outputting your own list page link.

For example, if your list page was called articleList.php and your category field was called category, your link would look like this:

EXAMPLE:
<a href="articleList.php?category=<?php echo $article['category'];?>">&lt;&lt; Back to list page</a>

In this example, $article is the variable you were using to output the contents of a single article record.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [osga] Manipulating "Back to list page" Link

By Jason - July 19, 2012

Hi,

$article will need to be replaced with whatever variable you're using on the page to output your content. A good way to figure this out is to see how your article title is being output in the code.

For example, if your variable was $articlesRecord, you would see:
<?php echo $articlesRecord['title'];?>

Whatever variable this is, is what you need to use in the example code. Also going through your site, it looks like you use the field categoryNum instead of category.

Give that a try.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/