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
Hi,
I have the following setup:
Site1
--pages and subpages of site1
Site2
--pages and subpages of site2
Shared content
--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?
Hi Iulia,
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:call-template name="search"> <xsl:with-param name="items" select="$site1Nodes | $sharedNodes" /> </xsl:call-template>
/Chriztian
Thanks Chriztian! I'll try that.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Search in two different nodes
Hi,
I have the following setup:
Site1
--pages and subpages of site1
Site2
--pages and subpages of site2
Shared content
--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?
Hi Iulia,
Here's the basic way of doing that:
Set up variables for the various sections:
- Then find the section in XSLTsearch.xslt where the search template is called and basically do this (the pipe character joins node sets):
/Chriztian
Thanks Chriztian! I'll try that.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.