[Solved] News module to load detailed page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

[Solved] News module to load detailed page

Post 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!?
Last edited by Cognatus on Mon Mar 30, 2015 11:07 am, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4017
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: News module to load detailed page

Post 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
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: News module to load detailed page

Post 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"}
Jos
Support Guru
Support Guru
Posts: 4017
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: [Solved] News module to load detailed page

Post by Jos »

There is no need to do it that way, but if you want to that's fine.
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: [Solved] News module to load detailed page

Post by Cognatus »

Ok, Jos, ofcourse I want to do it in a better way! :D

The example you posted uses the summary view, how can I aply something like that in the detailed view?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: [Solved] News module to load detailed page

Post by velden »

Cognatus wrote:Ok, Jos, ofcourse I want to do it in a better way! :D

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.
Locked

Return to “Modules/Add-Ons”