News parameter detailpage is not working

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
pustofkj
Forum Members
Forum Members
Posts: 19
Joined: Fri Feb 04, 2011 1:57 pm

News parameter detailpage is not working

Post by pustofkj »

Hi all... happy new year everybody :)

I have two type of news with the same summary and detail template (it means these have the same representation). But I need to show them in another leaf of my category tree because of $return_url variable and because of different submenu, which is shown in the left column of my pages.

I tried to use parameter detailpage with page alias according to News module help, but it is not working. I call it this way:

Code: Select all

{news category='my_category' number='20' detailpage='my_leaf_page_alias'}
Can you help me, please? Thank you very much :)
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: News parameter detailpage is not working

Post by manuel »

Dear pustofkj,

The code you show seems perfectly valid.
Have you made sure the target pages are using the different templates?
You can check the "breadcrumb navigation" to see if you are landing the same page or on different pages...

This shouldn't be an issue, please elaborate further if it isn't working for you...
show them in another leaf of my category tree
You do mean page tree, not?

Greetings,
Manuel
pustofkj
Forum Members
Forum Members
Posts: 19
Joined: Fri Feb 04, 2011 1:57 pm

Re: News parameter detailpage is not working

Post by pustofkj »

Yeah, of course, I meant page tree ;).
I solved this problem, but I don't understand one thing. The problem was I had news URL set (because of seo, I thought).

I filled:
Title
Category
Summary
Content
URL


When I delete URL of news, everything is correct and detail of my news is shown in correct page with correct menu and so on, but otherwise... ???
Why can't I set my own URL of news?

Thank you very much again. :)
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: News parameter detailpage is not working

Post by manuel »

I haven't tested setting custom URL's with News or CGblog yet... I always let them auto-generate using the article title.

Good to know about this anyway! It might save me a headache some day :)

Greetings,
Manuel
pustofkj
Forum Members
Forum Members
Posts: 19
Joined: Fri Feb 04, 2011 1:57 pm

Re: News parameter detailpage is not working

Post by pustofkj »

So did I, but now my client wants more "pretty" urls ;) - without numbers -> just path with article title - and, you know, "The customer is always right" ;) ::)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News parameter detailpage is not working

Post by Dr.CSS »

All those "numbers" etc. are telling News things like return ID = 15 or whatever the page was it came from, other numbers refer to the news article ID etc., removing those will just jack up the link back etc...
pustofkj
Forum Members
Forum Members
Posts: 19
Joined: Fri Feb 04, 2011 1:57 pm

Re: News parameter detailpage is not working

Post by pustofkj »

Hello again, I understand you. But once the possibility of setting URL is available, so I thought it should be possible to use it, shouldn't it? And it really is. News are displayed correctly, but inside the wrong parent page :( .
Ultimately, you're probably right (it is not working correctly :( ), but why the input field labeled as URL is in News administration? ???
It's strange and I would like this functionality in News module. Is here any simple way to make it work or I just have to write it all alone?
Thank you again :)
pustofkj
Forum Members
Forum Members
Posts: 19
Joined: Fri Feb 04, 2011 1:57 pm

Re: News parameter detailpage is not working

Post by pustofkj »

Hi again, I solved my problem with adding a little code to method
Last edited by Dr.CSS on Mon Jan 09, 2012 5:08 pm, edited 1 time in total.
Reason: Posting hacks to core files is forbidden, News is a core module...
User avatar
Franck
Dev Team Member
Dev Team Member
Posts: 261
Joined: Tue Jun 12, 2007 1:29 pm

Re: News parameter detailpage is not working

Post by Franck »

ok, so why the hell news URL exists if you can't use it? I mean, I tried the very same thing, and when setting a default page to display the detail article, it's ok. But if you need several pages to display several types/categories of articles, even if you specify the detail page in the page template, it ends in the default page entered in the news/option tab. Is there a workaround? Or is it a bug?
Post Reply

Return to “CMSMS Core”