News + Child category

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
alex7575

News + Child category

Post by alex7575 »

Hi everyone,

I'm trying to do something with the news module.
I've have a main category called '2006' and some children called 'Jan', 'Feb', ...

On my homepage, I would like to show the last 6 news of the category '2006' so I wrote this but it does not work:
{cms_module module='news' category='2006' summarytemplate='my_template.tpl' number='6'}
Does anyone got an idea to print the last news of my category called '2006'?

Alex
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: News + Child category

Post by Elijah Lofgren »

alex7575 wrote: Hi everyone,

I'm trying to do something with the news module.
I've have a main category called '2006' and some children called 'Jan', 'Feb', ...

On my homepage, I would like to show the last 6 news of the category '2006' so I wrote this but it does not work:
{cms_module module='news' category='2006' summarytemplate='my_template.tpl' number='6'}
Does anyone got an idea to print the last news of my category called '2006'?
Hmm... It looks like we need to make parent categories show the posts in the child categories.
I'll look into it and see if it is not too hard to add this.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: News + Child category

Post by Elijah Lofgren »

alex7575 wrote: On my homepage, I would like to show the last 6 news of the category '2006' so I wrote this but it does not work:
{cms_module module='news' category='2006' summarytemplate='my_template.tpl' number='6'}
Does anyone got an idea to print the last news of my category called '2006'?
I just found this in the help for the News module:
...
(optional) category="category" - Only display items for that category. Use * after the name to show children. Multiple categories can be used if separated with a comma. Leaving empty, will show all categories.
...
I tried it and it works.  ;D

Try this:
{cms_module module='news' category='2006*' summarytemplate='my_template.tpl' number='6'}
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: News + Child category

Post by Dr.CSS »

so am i to assume that this mens we can put the tag in a page and it will show Categories...
is this from the newest News Module?...
alex7575

Re: News + Child category

Post by alex7575 »

Thanx dude, works great :)
{cms_module module='news' category='2006*' summarytemplate='my_template.tpl' number='6'}
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: News + Child category

Post by Elijah Lofgren »

mark wrote: so am i to assume that this mens we can put the tag in a page and it will show Categories...
is this from the newest News Module?...
It will show posts from the category and all subcategories. It should work with the News module included with CMSMS 0.13 also.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: News + Child category

Post by Dr.CSS »

Thanx dude...  ;) how you been long time no talk...
any chance i could just update my News in the 0.13-beta4 "Canary"...
very scared to upgrade, last time i tried, it started eating my pages... mostly when i moved the order of pages.. up or down...
alex7575

Re: News + Child category

Post by alex7575 »

mark wrote: Thanx dude...  ;) how you been long time no talk...
any chance i could just update my News in the 0.13-beta4 "Canary"...
very scared to upgrade, last time i tried, it started eating my pages... mostly when i moved the order of pages.. up or down...
Works great with "CMSMS 0.13"  ;D
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: News + Child category

Post by Elijah Lofgren »

mark wrote: any chance i could just update my News in the 0.13-beta4 "Canary"...
Using CMSMS 0.13-beta4 and the News that comes with CMSMS 0.13 would probably work fine. They may not even be any different between them, I don't know.


mark wrote: very scared to upgrade, last time i tried, it started eating my pages... mostly when i moved the order of pages.. up or down...
That's quite odd. Hopefully when CMSMS 1.0 comes out you won't have that problem.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Post Reply

Return to “Tips and Tricks”