Page 1 of 1
[SOLVED] Latest news from specific category
Posted: Fri Oct 28, 2011 9:56 am
by urheat
The site has two news categories. I need to show the latest news in detail view from specific category. To be more specific: only one news from general-category.
I tried this:
Code: Select all
{news action="detail" articleid="-1" category="General"}
But category-attribute is ignored.
Can this be done?
CMSMS is 1.10. and news is 2.12.2.
Re: Latest news from specific category
Posted: Fri Oct 28, 2011 5:27 pm
by Dr.CSS
Why are you using the articleid="-1" and not the number='1' parameter?...
Re: Latest news from specific category
Posted: Sat Oct 29, 2011 8:10 am
by urheat
Dr.CSS wrote:Why are you using the articleid="-1" and not the number='1' parameter?...
Maybe I'm missing something, but do you mean like this:
Code: Select all
{news number="1" category="General"}
It works, but I need it to be in "detail-mode". This shows the news in shortened summary-mode. I also tried to add
action="detail", but it didn't work.
Re: Latest news from specific category
Posted: Sat Oct 29, 2011 8:13 am
by RonnyK
correct.... The articleid=-1, will only work icw action=detail and doesnt take category in account. To use that, make a summary-template similar as the detailtemplate and call that summarytemplate with the number= parameter. That way you get the last entry from a specific category in the look that you want.
Ronny
Re: Latest news from specific category
Posted: Sat Oct 29, 2011 10:06 am
by urheat
RonnyK wrote:correct.... The articleid=-1, will only work icw action=detail and doesnt take category in account. To use that, make a summary-template similar as the detailtemplate and call that summarytemplate with the number= parameter. That way you get the last entry from a specific category in the look that you want.
Ronny
Thanks! That can be done
Maybe
action=detail could take
category-attribute in account in future news-module releases... It would be more logical I think.