I think I need a bit of guidance. My current search/results page is already a little complicated to start with. Basically, I have surrounded each weblog’s results with “if” statements in order to output a whole range of information (custom_fields), relative category urls and custom entry paths. Broadly it looks like this:
<h2>Search Results<span>{exp:search:total_results} results found for <em>"{exp:search:keywords}"</em></span></h2>
<form id='searchform' method="post" action="http://www.website.com/" >
<div>
<input type="hidden" name="ACT" value="19" />
<input type="hidden" name="XID" value="" />
<input type="hidden" name="RP" value="search/results" />
<input type="hidden" name="NRP" value="" />
<input type="hidden" name="RES" value="" />
<input type="hidden" name="status" value="" />
<input type="hidden" name="search_in" value="" />
</div>
<div class="sort">
<h3>Refine your search for "<em>{exp:search:keywords}</em>"<h3>
<input type="hidden" name="keywords" value="{exp:search:keywords}" />
<select name="weblog_id[]">
<option value="" >Choose a site section...</option>
<option value="2" >Venues</option>
<option value="3" >Catering</option>
<option value="15" >Entertainment</option>
<option value="4" >Suppliers</option>
<option value="all" >Whole site</option>
</select>
<select name="custom_fields">
<option value="" selected="selected">Select the Venue Max Capacity</option>
<option value="venue-capacity-stand" >Standing Capacity</option>
<option value="venue-capacity-meet" >Meeting Capacity</option>
<option value="venue-capacity-sit" >Seated Capacity</option>
</select>
<div>
<input type='hidden' name='sort_order' value='asc' /><input type='submit' value='Filter Results' class='submit' />
</div>
</div>
</form>
<table border="0" cellpadding="6" cellspacing="1" width="100%" id="results-table">
<tbody>
{exp:search:search_results switch="resultRowOne|resultRowTwo"}
<tr class="search-tr-title">
<td class="{switch}" width="100%" valign="top" colspan="2">
{if weblog_id == '2'}
{exp:weblog:entries weblog="venues" dynamic_parameters="orderby|limit|sort|custom_fields"}
<table>
<tr>
<td width="460px"><p class="foundin">Found in: <a href="{homepage}/venues/">Venues</a> / <a href="{homepage}/venues/for-hire/{venue-primary-category}/">{venue-primary-category}</a></p></td>
<td width="200px" align="right"></td>
</tr>
<tr>
<td colspan="2"><h3><a href="{homepage}/venues/for-hire/{venue-primary-category}/{url_title}">{title}</a></h3></td>
</tr>
<tr>
<td width="460px"><p>{venue-address-street}, {venue-address-city}{if venue-address-county}, {venue-address-county},{/if} {venue-postcode}<p></td>
<td width="200px" align="right"><p>Standing Capacity: {venue-capacity-stand} </p></td>
</tr>
</table>
{/exp:weblog:entries}
{/if}
{if weblog_id == '3'}
{exp:weblog:entries weblog="catering" dynamic_parameters="orderby|limit|sort|custom_fields"}
<table>Relative Entry Content</table>
{/exp:weblog:entries}
{/if}
{if weblog_id == '4'}
{exp:weblog:entries weblog="suppliers"dynamic_parameters="orderby|limit|sort|custom_fields"}
<table>Relative Entry Content</table>
{/exp:weblog:entries}
{/if}
{if weblog_id == '15'}
{exp:weblog:entries weblog="entertainment" dynamic_parameters="orderby|limit|sort|custom_fields"}
<table>Relative Entry Content</table>
{/exp:weblog:entries}
{/if}
</td>
</tr>
<tr class="search-tr-body">
<td colspan="2" class="{switch}" width="100%">
{if weblog_id == '2'}
<p>{excerpt}<br /><a class="linkcontinue" href="{homepage}/venues/custom/url">Read more</a></p>
{/if}
{if weblog_id == '3'}
<p>{excerpt}<br /><a class="linkcontinue" href="{homepage}/catering/custom/url">Read more</a></p>
{/if}
{if weblog_id == '4'}
<p>{excerpt}<br /><a class="linkcontinue" href="{homepage}/suppliers/custom/url">Read more</a></p>
{/if}
{if weblog_id == '15'}
<p>{excerpt}<br /><a class="linkcontinue" href="{homepage}/entertainmen/tcustom/url">Read more</a></p>
{/if}
</td>
</tr>
{/exp:search:search_results}
As you can see, I’ve added in vain the custom_fields option in the dynamic parameter for each outputted weblog tag. Where / how would you suggest I add the search:parameter and link that to the select drop down menu in the Filtering Form. Obviously I’ve also been aimlessly stabbing around at the select options for “venue-standing-capacity” custom field. I’ve ignored the fact that this is only applicable to the “Venues” site section for now. And of course there are 3 kinds of Capacity types (standing, meeting, sitting). As long as one of them works I’ll be halfway there.
I’m also weary that I may have to create new custom fields for the Capacity types: dropdown selections with pre-formatted ranges (0-100, 101-500, etc). At the moment the client manually inputs a number for each type. Then again a search:venue-capacity-standing=“00” may do the trick. Since all values end in “00”.