[solved]Listit2 detail page uses sumary template

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

[solved]Listit2 detail page uses sumary template

Post 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
Last edited by HarmO on Wed Dec 03, 2014 4:48 pm, edited 1 time in total.
Kind regards,
HarmO
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Listit2 detail page uses sumary template

Post by velden »

action=detail requires a item id or something. Else the module does not know which item to display of course.
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Re: Listit2 detail page uses sumary template

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

Re: Listit2 detail page uses sumary template

Post 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.
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Re: Listit2 detail page uses sumary template

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

Re: Listit2 detail page uses sumary template

Post by velden »

You might consider using .htaccess rewrite rules or use url parameters to trigger ListIt2 on the page of your choice.
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Re: Listit2 detail page uses sumary template

Post 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.
Kind regards,
HarmO
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: [solved]Listit2 detail page uses sumary template

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [solved]Listit2 detail page uses sumary template

Post 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...
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: [solved]Listit2 detail page uses sumary template

Post 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?
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Re: [solved]Listit2 detail page uses sumary template

Post by HarmO »

Kind regards,
HarmO
Locked

Return to “Modules/Add-Ons”