Page 1 of 1

ListIt2 Search integration – redirect to summary page

Posted: Fri Mar 07, 2014 3:36 pm
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?

Re: ListIt2 Search integration – redirect to summary page

Posted: Fri Mar 07, 2014 4:13 pm
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}

Re: ListIt2 Search integration – redirect to summary page

Posted: Tue Mar 11, 2014 8:49 pm
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.