Page 1 of 1
Menu to list News category
Posted: Tue Sep 02, 2014 9:26 am
by AndrePereira
Hi,
My name is Andre and I am searching for a way to list all the categories from news in a menu.
I have been searching on the forum for this info but didn't found anything.
Can someone please help me?
Re: Menu to list News category
Posted: Tue Sep 02, 2014 11:28 am
by chandra
Make a look to the default summary template - the first part gives the output you want

.
Re: Menu to list News category
Posted: Fri Sep 12, 2014 12:45 pm
by AndrePereira
Thanks for your answer.
The problem is that I get the list of categories and also the news...
Re: Menu to list News category
Posted: Fri Sep 12, 2014 4:10 pm
by chandra
Re: Menu to list News category
Posted: Thu Sep 18, 2014 8:56 am
by AndrePereira
Great, worked better.
Now I just have like
NewsCategory (1) in the menu.
Do you know any way to take the (1) out?
Thanks for your help.
Re: Menu to list News category
Posted: Thu Sep 18, 2014 11:47 am
by Jo Morg
Go to News
Browse Category Template, search the template for
Code: Select all
{if $node.count > 0}
<a href="{$node.url}">{$node.news_category_name}</a> ({$node.count}){else}<span>{$node.news_category_name} (0)</span>{/if}
and remove both the
({$node.count}) and the
(0).
Use the default CMSMS sample content as a starting guide for CMSMS: most of the basics are documented there, and a more thorough documentation can be found
here. Additionally read the Help pages of modules and CMSMS core. Most things are documented there too. Some templates are also documented with plenty of comments about the Smarty code used in them, so it is recommended that you read them too.
HTH