Menu to list News 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
AndrePereira
New Member
New Member
Posts: 3
Joined: Tue Sep 02, 2014 9:22 am

Menu to list News category

Post 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?
chandra

Re: Menu to list News category

Post by chandra »

Make a look to the default summary template - the first part gives the output you want ;).
AndrePereira
New Member
New Member
Posts: 3
Joined: Tue Sep 02, 2014 9:22 am

Re: Menu to list News category

Post by AndrePereira »

Thanks for your answer.

The problem is that I get the list of categories and also the news...
chandra

Re: Menu to list News category

Post by chandra »

Try

Code: Select all

 
{news browsecat='1'}
AndrePereira
New Member
New Member
Posts: 3
Joined: Tue Sep 02, 2014 9:22 am

Re: Menu to list News category

Post by AndrePereira »

chandra wrote:Try

Code: Select all

 
{news browsecat='1'}
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.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Menu to list News category

Post 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
"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!
Locked

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