Page 1 of 1

CGBlog/news display category name in category view?

Posted: Sat Jun 25, 2011 9:58 am
by kalozura
Is there a way to display the category name in cgblog and news module when you are in a category page view? What I am trying to say is... When I'm in the summary view in a blog page and I click on a category to view only those articles within that category, I want to be able to show above all the articles the name of category that I am currently viewing. Is it possible? Please help!

Re: CGBlog/news display category name in category view?

Posted: Tue Jun 28, 2011 6:55 am
by tpsvca
I need the same thing...

Re: CGBlog/news display category name in category view?

Posted: Tue Jun 28, 2011 11:55 am
by tpsvca
tpsvca wrote:I need the same thing...
I have solution :)
Take it:
first you must to do everything about post title instead {title}:
http://forum.cmsmadesimple.org/viewtopic.php?t=30475
or
http://www.dootch.com/2010/04/seo-frien ... -in-cmsms/
(content stealer? :D )

After that:
put in to your summary template following code:

Code: Select all

{foreach from=$entry->categories item='category' name=cat}
	{if $category.category_id == $param_category_id}
		{assign var='pagetitle' value=$category.name}
	{/if}
{/foreach}
Works with News, CGBlog and Products ;)

Re: CGBlog/news display category name in category view?

Posted: Wed Jun 29, 2011 5:45 pm
by kalozura
Thanks for the info tpsvca, tho this didnt work for me, tried and double checked the steps 3 times and no dice, not sure why.

Re: CGBlog/news display category name in category view?

Posted: Thu Jun 30, 2011 4:56 am
by tpsvca
kalozura wrote:Thanks for the info tpsvca, tho this didnt work for me, tried and double checked the steps 3 times and no dice, not sure why.
post here your templates codes, i'll take a look