Category list in news module

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
rcp

Category list in news module

Post by rcp »

Hi!
I have a page that display several categories of news. I'm looking for a way to display all the categories names even those from categories w/o any articles. Anyone knows how to do this?

Thanks in advance!
slloyd
Forum Members
Forum Members
Posts: 195
Joined: Mon Apr 24, 2006 9:09 pm

Re: Category list in news module

Post by slloyd »

Just place the news code for each news category into your page where you want each category to display:

Code: Select all

{cms_module module="news" category="categoryname" number='3'}
You can add the number of news items you want displayed to it, too.


As far as displaying categories with no news items, I'm not sure how to do that except to plug in some text like, "No news items".
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Category list in news module

Post by Dr.CSS »

make a new template with just the...

  this is just for styling, the line below is the 'call'
{$entry->category}


and what ever other info you want to display, if you look at the default templates for News you will see a lot of these 'calls' just put the ones you want in the template...

{cms_module module="news"summarytemplate="thenameofyourtemplate.tpl"}
Locked

Return to “CMSMS Core”