ListIt2 - basic use - summary versus detail view

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Yogibear
Forum Members
Forum Members
Posts: 19
Joined: Fri Jun 21, 2013 1:52 pm

ListIt2 - basic use - summary versus detail view

Post by Yogibear »

Hello,

I am using CMSMS 1.11.7 with ListIt2 with Pretty URLs.

I am trying to get a fairly straightforward example working but I am obviously missing something and can't figure out what.

I want to show a people page within a company which lists a short summary of each person. Then there will be a link to the details page for each person.

I have a single CMSMS template where I am calling ListIt2 like this:

Code: Select all

{ListIt2People summarytemplate="people" detailtemplate="person" }
Within ListIt2People I have created a summary template which includes a link to the detail page like this:

Code: Select all

{foreach from=$items item=item}
     <a href="{$item->url}">
When I view the page it uses the summary template as expected.

For each person there is a link that looks like this:

Code: Select all

/people/person_name/64/person
This seems correct to me (although I don't understand where the 64 comes from.

If I click on the link, it seems to be using the ListIt2 summary template again, which is not what I expected.

i.e I cannot seem to display the detail page.

I am sure there is something obvious that I am missing, so I would be grateful for any help.

Many thanks
Adrian
Stikki

Re: ListIt2 - basic use - summary versus detail view

Post by Stikki »

Might be bug, if you disable pretty urls does it work then?

If so open bug report into forge, to ListIt Extended associated page.

You might also wanna check CGExtensions plugin cge_module_hint:
Description:

This function plugin can be used to provide hints for module behavior if various parameters cannot be specified on the URL. I.e: In a situation when a site is configured to use pretty urls for SEO purposes it is often impossible to provide additional module parameters like a detailtemplate or sort order on a URL. This plugin can be used in page templates, GCBs or in a page specific way to give hints as to how modules should behave.

Note: Any parameters that are specified on the URL will override matching module hints. i.e: When using News and a detailtemplate parameter is specified on a News detail url, any detailtemplate hints will have no effect.

Note: In order to ensure proper behavior, module hints must be created before the {content} tag is executed in the CMSMS page template. Therefore they should (normally) be created very early in the page template process. An ideal location for page specifc hints is in the "Smarty data or logic that is specific to this page:" textarea on the editcontent form.

Example:

When using the CGBlog module, and pretty urls. You wish to display blog articles for a specific category on one page, and would like to use a non standard detail template to display the individual articles on a differernt page. I.e: perhaps on your "Sports" page you are calling CGBlog like: {CGBlog category=sports detailpage=sports_detail}. However, using pretty urls it is impossible to specify a detailtemplate on the links that will generate the detail views. The solution is to use the {cge_module_hint} tag on the sports_detail page to provide some hints as to how CGBlog should behave on that page.

When editing the sports_detail page on the options tab, in the textarea entitled "Smarty data or logic that is specific to this page:" you could enter a tag such as: {cge_module_hint module=CGBlog detailtemplate=sports}. Now when a user clicks on a link from the CGBlog display on your "sports" page he will be directed to the sports_detail page, and the CGBlog detail template entitled "sports" will be used to display the article.

Usage:

{cge_module_hint module=ModuleName paramname=value ...}

Note: It is possible to specify multiple parameter hints to a single module in one call to this plugin.

Note: It is possible to call this module multiple times to provide hints to different modules.
Yogibear
Forum Members
Forum Members
Posts: 19
Joined: Fri Jun 21, 2013 1:52 pm

Re: ListIt2 - basic use - summary versus detail view

Post by Yogibear »

Hi,

I tried switching off pretty urls but the same thing happens.

Am I using the module correctly? Is this actually the correct way to call the module?

Code: Select all

{ListIt2People summarytemplate="people" detailtemplate="person" }
Many thanks
Adrian
oliverseddon
Forum Members
Forum Members
Posts: 89
Joined: Thu Aug 21, 2008 11:47 am

Re: ListIt2 - basic use - summary versus detail view

Post by oliverseddon »

What version of LI2 are you using?

I have just tested what you are trying with CMSMS 1.11.7 and LI2 1.4 with pretty URL's enabled.

I would suggest using single quotes round your params, although I doubt this will make a difference.

Using the call you have the detail will by default replace the LI2 call in your current page, unless you have set it in the prefs to replace the {content} tag. So if you have changed the prefs can you make sure you have a {content} call in your page, and if so is you detail appearing there, which will leave you summary there too. If this is the case, you could specify a detail page that doesn't contain your LI2 summary.
Post Reply

Return to “Modules/Add-Ons”