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.

eZ debug

Timing: Jan 18 2025 02:09:18
Script start
Timing: Jan 18 2025 02:09:18
Module start 'layout'
Timing: Jan 18 2025 02:09:18
Module start 'content'
Timing: Jan 18 2025 02:09:19
Module end 'content'
Timing: Jan 18 2025 02:09:19
Script end

Main resources:

Total runtime0.7854 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.5391152.6875
Module start 'layout' 0.00540.0035 742.226639.5547
Module start 'content' 0.00890.7752 781.7813422.8750
Module end 'content' 0.78400.0014 1,204.65638.0625
Script end 0.7854  1,212.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4308160.0002
Check MTime0.00130.1700160.0001
Mysql Total
Database connection0.00080.104110.0008
Mysqli_queries0.745894.9474520.0143
Looping result0.00040.0505500.0000
Template Total0.756196.320.3780
Template load0.00220.282720.0011
Template processing0.753995.978720.3769
Template load and register function0.00010.015710.0001
states
state_id_array0.00100.132310.0010
state_identifier_array0.00060.078420.0003
Override
Cache load0.00180.2351180.0001
Sytem overhead
Fetch class attribute can translate value0.00060.073610.0006
Fetch class attribute name0.00120.154220.0006
XML
Image XML parsing0.00010.011210.0001
class_abstraction
Instantiating content class attribute0.00000.004720.0000
General
dbfile0.00060.0781100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 4

Time used to render debug report: 0.0002 secs