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: [Jason] Manipulating "Back to list page" Link

By osga - July 19, 2012

Hi Jason, thanks for the start... i changed the "articleList.php" to our template page but it still lists every category we have...and gives a url of:
online_gaming.php?category=Notice: Undefined variable: article in /var/www/html/osga.com/online_gaming_articles.php on line 231

Maybe i shoulda prefaced my question with "we are really bad with php..." lol! What are we missing here? the "$article" or the "['category']"