the value is pulled through as normal. But I can't get it to function as a param and have it pull through just by referencing the param's name. Here's the full markup:
In order to use a macro parameter, you first need to add the parameter to the Macro under Developer -> Macros - (your macro) - Parameters tab, and click the Show checkbox. (You probably already did this?)
Can't display parameter?
Hi,
Sorry if this is really simple/doesn't make much sense - my knowledge of XSLT is rather limited.
I can't seem to set a param and have it pull through on the front end.
The param in question is 'month-id'. When I replace the following line:
<xsl:value-of select="$month-id" />
with this line:
<xsl:value-of select="umbraco.library:FormatDateTime(pressDate, 'MMMM yyyy')" />
the value is pulled through as normal. But I can't get it to function as a param and have it pull through just by referencing the param's name. Here's the full markup:
<xsl:param name="month-id" select="umbraco.library:FormatDateTime(pressDate, 'MMMM yyyy')"/>
<xsl:template match="/">
<div id="featureNewsItem">
<xsl:for-each select="$currentPage/pressArticle[position()=1]" >
<div>
<xsl:value-of select="$month-id" />
<img src="{imageOne}" height="130" alt="" style="float:left;" />
<div style="width:570px;">
<img width="149" height="58" src="{pressTopLogo}" />
</div>
<span style="color:#E70079;font-size:1.4em;margin-left:7px;">
<xsl:value-of select="articleHeadline" />
</span>
<div style="margin-left:13px;">
<xsl:value-of select="newsStory" disable-output-escaping="yes"/>
</div>
<a id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_C2kMasterPlaceholder_NewsSectionManagementArea_5_hlHeadlineTop" href="{umbraco.library:NiceUrl(@id)}">
</a>
</div>
</xsl:for-each>
Thanks for any help!
Philip
Hi Philip,
In order to use a macro parameter, you first need to add the parameter to the Macro under Developer -> Macros - (your macro) - Parameters tab, and click the Show checkbox. (You probably already did this?)
Then in your code you need:
Then you can use $month-id
Hope this helps,
Tom
Thanks!
is working on a reply...