News action="detail" url error

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

News action="detail" url error

Post 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.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: News action="detail" url error

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

Re: News action="detail" url error

Post 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?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News action="detail" url error

Post by velden »

I guess the articleid parameter is required for the action=detail.
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

Re: News action="detail" url error

Post by howey »

Hi

Any idea how I can display news item in detail from a given category?
yannkee
Forum Members
Forum Members
Posts: 14
Joined: Thu Apr 17, 2008 6:37 pm

Re: News action="detail" url error

Post 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
----------------
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News action="detail" url error

Post 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?
yannkee
Forum Members
Forum Members
Posts: 14
Joined: Thu Apr 17, 2008 6:37 pm

Re: News action="detail" url error

Post 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...
Post Reply

Return to “The Lounge”