Page 1 of 1
Search inside archives listing
Posted: Mon Mar 05, 2012 2:53 pm
by Barberousse
Hello,
I'd like to have a search feature that lists results a bit like the archives summary page for instance (entries titles only, grouped by month). Is there any plugin or configuration / embedded code that would permit to search inside archives or achieve this result ?
Thank you.
Barberousse.
Re: Search inside archives listing
Posted: Mon Mar 05, 2012 4:03 pm
by garvinhicking
Hi!
Search results are routed through entries.tpl, and in there you can check for {if $view == 'search'}...{/if} to create a specific file.
If it's easier to maintain you could modify your current entries.tpl to "entries_normal.tpl" and copy the file to entries_search.tpl. Then inside entries.tpl you use:
Code: Select all
{if $view == 'search'}
{include file="entries_search.tpl"}
{else}
{include file="entries_normal.tpl"}
{/if}
HTH
Garvin
Re: Search inside archives listing
Posted: Mon Mar 05, 2012 4:14 pm
by Don Chambers
... and to see an example of how the archives page you mention is constructed, look in either the /templates/default or /templates/bulletproof folders for the file entries_summary.tpl. You can copy one of these files to your template folder and modify it there.
Re: Search inside archives listing
Posted: Mon Mar 05, 2012 4:33 pm
by Barberousse
Ok, I will try that, Thank you.