Search inside archives listing

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Search inside archives listing

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Search inside archives listing

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Search inside archives listing

Post 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.
=Don=
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Re: Search inside archives listing

Post by Barberousse »

Ok, I will try that, Thank you.
Post Reply