CGBlog Detail page link question

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
drquietus
New Member
New Member
Posts: 2
Joined: Wed May 23, 2012 1:32 pm

CGBlog Detail page link question

Post by drquietus »

I have the latest version of all software/mods.

CGBlog is set up and working fine. I have two categories set up in the blog and have set up a page that show posts for each of the those categories.

On the home page i have all the posts listed, from both categories chronologically. When you click on a post that is in category A, I want the detail page to be the category A page, and when you click on a post that is in category B, I want the detail page to be the category B page.

So, from the same summary template is there any way to have a different detailpage url based on the category that the post is in?
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: CGBlog Detail page link question

Post by Wishbone »

With a bit of PHP knowledge, you can pass $items to a UDT at the beginning of the summary template. In this UDT, you would loop through the entries, check the category and change the URL (I believe it's returnid?) to point to the new page. Pass $items back to smarty, and let the rest of the summary template run.
Post Reply

Return to “Modules/Add-Ons”