OK - you can try adding ?umbDebugShowTrace=True to the URL of the page that fails, to see if you get a better errordescription (may not be possible).
So, the $dat1 parameter has to be in scope at the time you use it in the call to the SliderTemplate template - do you know what that means - can you check that? Otherwise, you need to post a larger chunk of the XSLT so I can see what's going on.
adding a value from the macro to the template
Hi,
(Sorry I have added this in template section but think it is probably and xslt question)
I have a macro which will be recursive. The macro starts by getting the values passed in the page
<xsl:param name="link1" select="/macro/link1"/>
<xsl:param name="link2" select="/macro/link2"/>
<xsl:param name="dat1" select="umbraco.library:GetXmlNodeById($link1)"/>
<xsl:param name="dat2" select="umbraco.library:GetXmlNodeById($link2)"/>
then a template will be selected
<xsl:call-template name="DoSlider" /> (more code left out for ease - but it needs to be called like this)
and from that template i want to call another template recursivly for a list it
<ul class="touchcarousel-container">
<xsl:call-template name="SliderTemplate" slide="[$dat1]" />
<xsl:call-template name="SliderTemplate" slide="[$dat2]" />
</ul>
in the other template call something like this
<xsl:template name="SliderTemplate">
<xsl:param name="dat" select="$slide"/>
But it doesn't like the slide="[$dat2]" bit and probably the select="$slide"
Can anyone help with this.
Thanks
Kelvin
Hi Kelvin,
You pass parameters with the xsl:with-parameter instruction, like this:
(Updated original, as I misunderstood the question initially)
/Chriztian
I keep getting this
Error in XSLT at line 89, char 15
87: <ul class="touchcarousel-container">
88: <xsl:call-template name="SliderTemplate">
89: >>> <xsl:with-param name="slide" select="$dat1" /> <<<
90: </xsl:call-template>
is it $dat1 ?
dat1 comes from
<xsl:param name="dat1" select="umbraco.library:GetXmlNodeById($link1)"/>
Hi Kelvin,
What does the error say?
/Chriztian
This is all the error i am getting
Error in XSLT at line 89, char 15
87: <ul class="touchcarousel-container">
88: <xsl:call-template name="SliderTemplate">
89: >>> <xsl:with-param name="slide" select="$dat1" /> <<<
90: </xsl:call-template>
OK - you can try adding ?umbDebugShowTrace=True to the URL of the page that fails, to see if you get a better errordescription (may not be possible).
So, the $dat1 parameter has to be in scope at the time you use it in the call to the SliderTemplate template - do you know what that means - can you check that? Otherwise, you need to post a larger chunk of the XSLT so I can see what's going on.
/Chriztian
Yes it works that now works thank you.
I do still have a problem but think it is a different issue. I'll post it up on another post!!
Thanks
is working on a reply...