News returnid depending on category

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
User avatar
hgpdesign
Forum Members
Forum Members
Posts: 47
Joined: Wed Jul 09, 2008 7:06 am

News returnid depending on category

Post by hgpdesign »

Since we upgraded one of our sites from 1.11.4 to 1.11.6 we have a news returnid-problem.

In order to show a news item from a summary including several categories on its own specific page we have put in this code of 'Peciura':

Code: Select all

{capture assign='category_page'}{$entry->category|replace:' ':'-'|lower}{/capture}
{$entry->titlelink|regex_replace:'/returnid=[^&]*/':"returnid=$category_page"}
This always worked fine but now it throws in an an 'Not Found' error if the category starts with numbers (like in 'News,cntnt01,detail,0&cntnt01articleid=734&cntnt01returnid=12-13-a1') or it goes to the home page instead of the page_alias (as in 'News,cntnt01,detail,0&cntnt01articleid=610&cntnt01returnid=nieuws').

What can we do to resolve this?

Or maybe there is a better way in reaching our goal... we only want a news article to show up on its own page (depending on its category) when listed on the home page (or any other page) with multiple categories (like in '{news category="sports*"}'). F.i. an 'category=soccer' news article must show on the 'soccer' page as an 'category=baseball' news article must show on the 'baseball' page.

Thanks in advance.

Kind regards,
Ron Hoenson

(We have dozens of categories so renaming all categories and our page_aliases is not something we would be looking forward to do if there is another way...)
Locked

Return to “[locked] Installation, Setup and Upgrade”