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
I'm trying to get the text from a radiobutton list but am getting an XSLT error:
<xsl:param name="currentPage"/> <xsl:template match="/"> <!-- Create filter box --> <div id="filterBox"> <form id="filter"> <fieldset class="category"> <legend>Filter by Category</legend> <label class="label_radio"><input type="radio" name="type" value="all" checked="checked" />All Categories</label> <xsl:variable name="prevalues" select="umbraco.library:GetPreValues(1187)" /> <xsl:for-each select="$prevalues/*"> <xsl:sort select="."/> <label class="label_radio"> <input type="radio" name="type"><xsl:attribute name="value"> <xsl:value-of select="." /></xsl:attribute><xsl:value-of select="." /> </input> </label> </xsl:for-each> </fieldset> </form> </div> <ul id="clubList"> <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <xsl:attribute name="data-id">id-<xsl:value-of select="position()"/></xsl:attribute> <xsl:if test="./clubCategory!=''"> <!-- This is where the macro fails, its doesn't seem to like the GetPreValueString --> <!--<xsl:attribute name="data-type"><xsl:value-of select="umbraco.library:GetPreValueAsString(clubCategory)"/></xsl:attribute>--> <!-- Although it will return the correct clubCategory ID from the radiobutton list --> <xsl:attribute name="data-type"><xsl:value-of select="clubCategory"/></xsl:attribute> </xsl:if> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> <div class="clearBoth"></div> <div class="clubListing"> <img src="{concat(substring-before(umbracoFile,'.'), '_clubThumbnail.jpg')}" class="right clubThumb" alt="{alternateText}" title="{alternateText}" width="120px" height="75px" /> <p><xsl:value-of select="snippetText"/></p> </div> </li> </xsl:for-each> </ul> </xsl:template>
<li data-id="id-1" data-type="28"></li> <li data-id="id-2" data-type="29"></li> <li data-id="id-3" data-type="28"></li> <li data-id="id-4" data-type="31"></li> <li data-id="id-5" data-type="32"></li>
Hi ianhoughton,
What does the error say? Is it the "Value was either too large or too small for an Int32." ?
/Chriztian
it look like this line wasn't pulling out any items without a Value
<xsl:iftest="./clubCategory!=''">
There was 1 node without a value.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
GetPreValueAsString in XSLT
I'm trying to get the text from a radiobutton list but am getting an XSLT error:
Hi ianhoughton,
What does the error say? Is it the "Value was either too large or too small for an Int32." ?
/Chriztian
it look like this line wasn't pulling out any items without a Value
There was 1 node without a value.
is working on a reply...