How to configure search function on multi site installation for not cross over.

Author Message

Juan Asencio

Thursday 08 April 2010 2:48:03 am

I have an installation with several siteaccess. I want the visitor of any of these siteaccess to be able to do a search only from the content of the siteaccess the user is using.

Any suggestions or links to where I could find info about this?

Thanks in advance,

Juan.-

Juan Asencio

Wednesday 21 April 2010 12:56:37 am

I solve this adding "node settings" on the site.ini file of each siteaccess:

(Probably the right place to do it would be content.ini, but it works anyway).

Define on the site.ini file of the siteaccess a root node:

[NodeSettings]

RootNode=215

And on the search template:

/var/www/ezpublish-4.3/design/my-desing/templates/page_header_searchbox.tpl

{def $sub_node_id=ezini("NodeSettings","RootNode","site.ini")}

<input type="hidden" name="SubTreeArray" value="{$sub_node_id}" />

Something similar was done on advancesearch template.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.