Page 1 of 1

News parameter detailpage is not working

Posted: Mon Jan 02, 2012 8:35 am
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 :)

Re: News parameter detailpage is not working

Posted: Tue Jan 03, 2012 11:44 pm
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

Re: News parameter detailpage is not working

Posted: Thu Jan 05, 2012 8:17 am
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. :)

Re: News parameter detailpage is not working

Posted: Thu Jan 05, 2012 11:58 am
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

Re: News parameter detailpage is not working

Posted: Thu Jan 05, 2012 1:02 pm
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" ;) ::)

Re: News parameter detailpage is not working

Posted: Fri Jan 06, 2012 3:05 am
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...

Re: News parameter detailpage is not working

Posted: Fri Jan 06, 2012 10:04 am
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 :)

Re: News parameter detailpage is not working

Posted: Mon Jan 09, 2012 1:22 pm
by pustofkj
Hi again, I solved my problem with adding a little code to method

Re: News parameter detailpage is not working

Posted: Mon Jan 30, 2012 9:52 pm
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?