Page 1 of 1

News action="detail" url error

Posted: Fri May 05, 2017 9:35 am
by howey
When adding the news tag to display a news article in detail I am getting an error where the whole page doesn't display and I get

Code: Select all

Not Found
The requested URL was not found on this server
The News tag and parameters I am using is

Code: Select all

{news category="Projects" number="1" detailpage="projects-and-case-studies" detailtemplate="01_projectdetail" action="detail"}
However, if I add

Code: Select all

articleid="-1"
The latest news article displays with no error. Unfortunately, I only want news from the Projects category to display.

I've tried a few variations ie not including the category parameter to test what variations work. Only adding the articleid works.

Any help advice gratefully received.

Re: News action="detail" url error

Posted: Fri May 05, 2017 9:54 am
by Rolf

Re: News action="detail" url error

Posted: Fri May 05, 2017 10:11 am
by howey
Hi

I followed the recommendations on the link.

I've set "Default page to use for detail views" in News Options to the Projects page, alias=projects. Reset the page alias to projects on the page content and on the News detailpage='projects'.

The news tag works with the following

Code: Select all

{news category="Projects" number="1" detailpage="projects" detailtemplate="01_projectdetail" articleid="-1" action="detail"}
If I remove the articleid="-1" the page fails.

I've cleared the cache etc, just to be on the safe side, still no joy?

Re: News action="detail" url error

Posted: Fri May 05, 2017 1:16 pm
by velden
I guess the articleid parameter is required for the action=detail.

Re: News action="detail" url error

Posted: Fri May 05, 2017 2:12 pm
by howey
Hi

Any idea how I can display news item in detail from a given category?

Re: News action="detail" url error

Posted: Tue Jun 06, 2017 12:22 pm
by yannkee
Exactly same issue... only works when I use this article_id=-1 trick

My code rending no error (but not with the right category filter) :

Code: Select all

{News category="fr_FR" number='1' detailpage="accueil" detailtemplate="News Detail Sample" action="detail" articleid="-1"}

Where does this trick come from by the way?

----------------
CMS Made Simple™ 2.1.6 “Spanish Wells” installed yesterday
----------------

Re: News action="detail" url error

Posted: Tue Jun 06, 2017 12:48 pm
by velden
I don't understand the problem. If you want to display a specific item in detail view then supply the item id.

What exactly is it what you want to do?

Re: News action="detail" url error

Posted: Tue Jun 06, 2017 1:06 pm
by yannkee
I wanted to display only the detail templates when I call a specified category.
This way does not work:

Code: Select all

{News category="fr_FR" action="detail"}
so I tried other ways...
This way is ok:

Code: Select all

{News category="fr_FR"}
but I had to modify "News::Summary" template and it looked not logical to me to deal with it...
Finally I guess it's normal, I must have misunderstood something, I modified this "Summary" template to display only details, by deleting the summary relative code stuff...