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: [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']"

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/