Page 1 of 1

[solved]Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 10:09 am
by HarmO
Hi,

i generally use ListIt2 to manage lists of items on 1 page,
but this time every item should get its own detail page, but i don't seem to be able to get ListIt2 to use my detail template.

So i make a page for the summary and use this code:

Code: Select all

{ListIt2Referenties detailpage="detailpg"}
I also made a page for the details called detailpg, ofcourse i have to call the module in this page so i use this code

Code: Select all

{ListIt2Referenties template_detail="default"}
the detail template code is currently just an print out of the array so i can see all my variables.

Code: Select all

{$item|@print_r}
If i stipulate that the action in the detailpg is detail i get this error: missing parameter, this should not happen

Code: Select all

{ListIt2Referenties template_detail="default" action="detail"}
Can anyone tell me what i do wrong?

CMSMS 1.11.11
ListIt2 1.4.1

Re: Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 1:30 pm
by velden
action=detail requires a item id or something. Else the module does not know which item to display of course.

Re: Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 1:49 pm
by HarmO
Shouldn't the <a href="{$item->url}">more</a> link from the summary template redirect to the details of the item and to display, use the detail template?

in my case, it goes to a detail URL, but shows the summary template:

Summary http://staging.imperbel.net/nl/refs
Detail: http://staging.imperbel.net/nl/refs/lof ... riessen/64

Re: Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 2:04 pm
by velden
(optional) detailtemplate="default" - The detail template you wish to use.
(optional) summarytemplate="default" - The summary template you wish to use.
...
(optional) detailpage="" - Page to display item details in. Must be a page alias/id. Used to allow details to be displayed in a different page than summary.
iirc you need to use the tag only on the summary page and use the right parameter for detailtemplate there.

Re: Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 2:31 pm
by HarmO
ok, I found the problem.

as url prefix, i used "nl/refs".
When i change this to "refs", the detail link now shows the details.

But this is not what i want because this is a multi-lingual website and these items should apear in the /nl/-structure.

Re: Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 2:56 pm
by velden
You might consider using .htaccess rewrite rules or use url parameters to trigger ListIt2 on the page of your choice.

Re: Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 3:28 pm
by HarmO
if you set your listit2 url-prefix to "nl/listit2" the module doesn't work well: detailpages use the summary-template.

I think some how this could be solved with some htaccess url rewriting in combination with smarty modifiers but i don't seem to find any info on this.

Re: [solved]Listit2 detail page uses sumary template

Posted: Wed Dec 03, 2014 8:08 pm
by psy
Try

Code: Select all

<a href="{$item->url|replace:'.net':'.net/nl'}" title="{$item->title}">{$item->title}</a>
What this does:
1. Generates the basic LI2 detail link
2. Inserts the 'nl' bit after .net
3. Correctly displays the item detail with the modified URL and the default detail template (at least it did in my test)

HTH

Re: [solved]Listit2 detail page uses sumary template

Posted: Thu Dec 04, 2014 6:22 am
by Dr.CSS
It sounds like you should be using sectionheaders call nl and whatever other lang. you have, then put the correct lang pages under them and you will have /nl/ in your URL auto and the detail template should work...

Re: [solved]Listit2 detail page uses sumary template

Posted: Thu Dec 04, 2014 6:47 am
by psy
It sounds like you should be using sectionheaders call nl and whatever other lang. you have, then put the correct lang pages under them and you will have /nl/ in your URL auto and the detail template should work...
It doesn't. ListIt2 automatically generates the route to the detail info for each item in a summary list, including the displayed URL, and ignores the page hierarchy other than the return_id and its associated page template. AFAIK, this happens with every summary/detail module?

Re: [solved]Listit2 detail page uses sumary template

Posted: Sat Dec 06, 2014 3:55 pm
by HarmO