Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have the following setup:
--pages and subpages of site1
--pages and subpages of site2
--nodes used by borh Site1 and Site2
How can I set up my xslt search so that it searches both thorugh Site1 and Shared content but not through Site2?
Here's the basic way of doing that:
Set up variables for the various sections:
<!-- Absolute root of Content section -->
<xsl:variable name="root" select="$currentPage/ancestor::root" />
<!-- Find each section by its @id (could just as easily be by @nodeName or something else) -->
<xsl:variable name="site1Nodes" select="$root/*[@id = SITE1_ID]//*[@isDoc]" />
<xsl:variable name="site2Nodes" select="$root/*[@id = SITE2_ID]//*[@isDoc]" />
<xsl:variable name="sharedNodes" select="$root/*[@id = SHARED_ID]//*[@isDoc]" />
- Then find the section in XSLTsearch.xslt where the search template is called and basically do this (the pipe character joins node sets):
<xsl:with-param name="items" select="$site1Nodes | $sharedNodes" />
Thanks Chriztian! I'll try that.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted