Friday 18 August 2006 3:20:07 am
Apologies if this has been answered elsewhere. I did look, but couldn't find anything. Basically I am setting up EZP to run accross several different domains, with each domain using a different siteaccess. I am having trouble making the search function for each domain only return results for the relevant node. I created an override template for searchbox.tpl for the relevant siteaccess and changed the node ID in the code as per below:
<form action={"/content/search/"|ezurl} method="get"><input class="searchinput" type="text" size="10" name="SearchText" value="" />
<input type="image" class="searchimage" src={"1x1.gif"|ezimage} />
{section show=$relative_check|eq( 'yes' )}
{section show=is_set( $module_result.content_info.node_id )}
{let node_id=$module_result.content_info.node_id}
{section show=$node_id|ne( 150 )}
<div class="optionblock">
<input type="radio" class="radiobutton" name="SubTreeArray[]" value="" /><label for="search-global">{'Global'|i18n( 'design/standard/toolbar/search' )}</label>
<input type="radio" class="radiobutton" name="SubTreeArray[]" value="{$node_id}" checked="checked" /><label for="search-here">{'From here'|i18n( 'design/standard/toolbar/search' )}</label>
</div>
{/section}
{/let}
{/section}
{/section}
</form>
I assumed that it would simply be a case of changing the line
{section show=$node_id|ne( 2 )}
to {section show=$node_id|ne( 150 )}
As I just want it to return results from node 150 (and sub-nodes thereof). However, it doesn't seem to have any effect, so this obviously isn't the case. Please can someone advise how I achieve a local search per siteaccess? Sorry if this is a really dumb question - I'm still finding my way around EZP. Thanks!
|