ListIt2 Search integration – redirect to summary page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
10010110
Translator
Translator
Posts: 224
Joined: Tue Jan 22, 2008 9:57 am

ListIt2 Search integration – redirect to summary page

Post by 10010110 »

When I enable searchability in ListIt2 instances and use the search, it shows links to the detail view of the ListIt items. However, I’m not using that view, I’m just listing things, and therefore want the search result link to the overview/listing page. How would I do that?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: ListIt2 Search integration – redirect to summary page

Post by velden »

Inside search result template check for module instance and if it's the LI2 instance, just link to the specific page?

Code: Select all

{if $entry->module == 'ListIt2YourInstance'}
  <li>{$entry->title} - <a href="{cms_selflink href="YourTargetPageAlias"}
">{$entry->urltxt}</a> ({$entry->weight}%)</li>
 {/if}
10010110
Translator
Translator
Posts: 224
Joined: Tue Jan 22, 2008 9:57 am

Re: ListIt2 Search integration – redirect to summary page

Post by 10010110 »

Thanks, velden, that’s a good idea but it brings up the actual problem for my application (and a general weakness of the system) because I’m listing things from the same instance on different pages but an entry exists only once in the database, so there we go. I guess there is no way for the Search module to know on which page an entry of LI2 is displayed.

So I’ll probably have to get creative with the detail page somehow.
Post Reply

Return to “Modules/Add-Ons”