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?
Menu to list News category
Re: Menu to list News category
Make a look to the default summary template - the first part gives the output you want
.

-
- New Member
- Posts: 3
- Joined: Tue Sep 02, 2014 9:22 am
Re: Menu to list News category
Thanks for your answer.
The problem is that I get the list of categories and also the news...
The problem is that I get the list of categories and also the news...
-
- New Member
- Posts: 3
- Joined: Tue Sep 02, 2014 9:22 am
Re: Menu to list News category
Great, worked better.chandra wrote:Try
Code: Select all
{news browsecat='1'}
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
Go to News Browse Category Template, search the template for
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
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}
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
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!