Page 1 of 1
[Solved] News module to load detailed page
Posted: Sun Mar 29, 2015 4:29 pm
by Cognatus
I want to configure the news module tag, that i have placed in content, to load the detailed view with the latest article of a certain category, how is this done. I have tried:
Code: Select all
{news action="detail" articleid="-1" category="mycategory"}
Code: Select all
{news action="detail" category="mycategory"}
but it doesn't work!?
Re: News module to load detailed page
Posted: Sun Mar 29, 2015 10:09 pm
by Jos
The parameter category only works with action='default' which is the summary view
The parameter articleid only works with action='detail'
So the two won't work together.
A solution could be to show only one article in summary view with:
Code: Select all
{news category='mycategory' number=1}
This also implies that you need to create a new summary template that looks like a detail template
Re: News module to load detailed page
Posted: Mon Mar 30, 2015 11:06 am
by Cognatus
OK, thanks for the info, I will handle it this way, changing article number manualy each time a new article is added in the particular category:
Code: Select all
{news action="detail" articleid="5"}
Re: [Solved] News module to load detailed page
Posted: Mon Mar 30, 2015 11:10 am
by Jos
There is no need to do it that way, but if you want to that's fine.
Re: [Solved] News module to load detailed page
Posted: Mon Mar 30, 2015 11:23 am
by Cognatus
Ok, Jos, ofcourse I want to do it in a better way!
The example you posted uses the summary view, how can I aply something like that in the detailed view?
Re: [Solved] News module to load detailed page
Posted: Mon Mar 30, 2015 11:47 am
by velden
Cognatus wrote:Ok, Jos, ofcourse I want to do it in a better way!
The example you posted uses the summary view, how can I aply something like that in the detailed view?
You don't. Like Jos said, you can create a summary template that behaves like a detail template. All needed information is present in summary template too.