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 all,
in a macro i have this variable
<xsl:variable name="speciali" select="umbraco.library:GetXmlNodeById(1446)/SpecialiArticle [string(visibileInHomePage) = '1' and string(codicePubblicazione) =$currentPage/codicePubblicazione]" />
now i need to seek also in another id node but whit the same condiction.
<xsl:variable name="speciali2" select="umbraco.library:GetXmlNodeById(1999)/SpecialiArticle [string(visibileInHomePage) = '1' and string(codicePubblicazione) =$currentPage/codicePubblicazione]" />
it's possible to merge the result of the two select so i can have just one <xsl:for-each select="$speciali">
......
thank you
nico
Hi Niccolo
Could you perhaps post the whole XSLT code and perhaps explain a bit about what you're trying to achieve? I'm thinking we might be able to do the above thing in a more easy way perhaps.
/Jan
Hi Niccolo,
You can do either of these:
With your variables created you can do:
<xsl:for-each select="$speciali | $speciali2"> <!-- Do stuff --> </xsl:for-each>
Otherwise, if you want to get rid of the duplication (and calling extension functions), try this:
<xsl:variable name="siteRoot" select="$currentPage/ancestor-or-self::*[@level = 1]" /> <xsl:variable name="speciali" select="$siteRoot//*[@id = 1446 or @id = 1999]/SpecialiArticle[visibileInHomePage = 1][codicePubblicazione = $currentPage/codicePubblicazione]" /> <xsl:for-each select="$speciali"> <!-- Do stuff --> </xsl:for-each>
/Chriztian
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
select from two xmlnode
Hi all,
in a macro i have this variable
<xsl:variable name="speciali" select="umbraco.library:GetXmlNodeById(1446)/SpecialiArticle
[string(visibileInHomePage) = '1' and string(codicePubblicazione) =$currentPage/codicePubblicazione]" />
now i need to seek also in another id node but whit the same condiction.
<xsl:variable name="speciali2" select="umbraco.library:GetXmlNodeById(1999)/SpecialiArticle
[string(visibileInHomePage) = '1' and string(codicePubblicazione) =$currentPage/codicePubblicazione]" />
it's possible to merge the result of the two select so i can have just one <xsl:for-each select="$speciali">
......
thank you
nico
Hi Niccolo
Could you perhaps post the whole XSLT code and perhaps explain a bit about what you're trying to achieve? I'm thinking we might be able to do the above thing in a more easy way perhaps.
/Jan
Hi Niccolo,
You can do either of these:
With your variables created you can do:
Otherwise, if you want to get rid of the duplication (and calling extension functions), try this:
/Chriztian
is working on a reply...