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 tried changing the $source node by making a little modification to XSLTSearch.
I wanted the search to take place in all child nodes of the currently selected level 1 node. So I changed this
<xsl:variable name="source" select="string(ps:getParameter(string(//macro/source), '-1'))"/>
to this
<xsl:variable name="source"> <xsl:value-of select="string($currentPage/ancestor-or-self::node [@level=1]/@id)"/> </xsl:variable>
However, this did not work.
I also had to change this line:
<xsl:with-param name="items" select="./descendant-or-self::node"/>
<xsl:with-param name="items" select="umbraco.library:GetXmlNodeById($source)/descendant-or-self::node"/>
As far as I can see the . in the original line means that the search should take place on the search page itself and all it's childs, if any.
Is this a bug in XSLTsearch or do I misunderstand something? :S
Hi Martin
Maybe the solution is to simply write this in the first variable
<xsl:variable name="source" select="string(ps:getParameter(string(//macro/source), $currentPage/@id))" />
Then I think XSLTsearch will only return results from the current node and it's children.
Could this be the solution?
/Jan
I have no problem making XSLTSearch search through the search page and all of its child nodes.
It does this by default and, as I write, I think that it is a bug.
More specifically it is the "." (dot) in this line
that should be changed to "umbraco.library:GetXmlNodeById($source)" so the line looks like this in stead:
THEN it searches in the node specified in the "source" parameter and all of it's child nodes - but not until the fix above has been made.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Changing source node - Bug in XSLTSearch?
Hi
I tried changing the $source node by making a little modification to XSLTSearch.
I wanted the search to take place in all child nodes of the currently selected level 1 node. So I changed this
to this
However, this did not work.
I also had to change this line:
to this
As far as I can see the . in the original line means that the search should take place on the search page itself and all it's childs, if any.
Is this a bug in XSLTsearch or do I misunderstand something? :S
Hi Martin
Maybe the solution is to simply write this in the first variable
<xsl:variable name="source" select="string(ps:getParameter(string(//macro/source), $currentPage/@id))" />
Then I think XSLTsearch will only return results from the current node and it's children.
Could this be the solution?
/Jan
I have no problem making XSLTSearch search through the search page and all of its child nodes.
It does this by default and, as I write, I think that it is a bug.
More specifically it is the "." (dot) in this line
that should be changed to "umbraco.library:GetXmlNodeById($source)" so the line looks like this in stead:
THEN it searches in the node specified in the "source" parameter and all of it's child nodes - but not until the fix above has been made.
is working on a reply...