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 value of a Data Type drop down that I have used in the property of my page.
I can easily get the text, but I need the value/id as I am using that to pass through to a query string on a search I have.
I've tried several different things and none of the following worked:
<xsl:value-of select="$currentPage/colorGroup//value/@id"/>
And this didn't work:
<xsl:if test="$currentPage/colorGroup !=''"> <xsl:value-of select="string(umbraco.library:GetPreValueAsString($currentPage/colorGroup))"/> </xsl:if>
This didn't work either:
<xsl:if test="string-length($currentPage/colorGroup) > 0"> <xsl:variable name="items" select="umbraco.library:Split($currentPage/colorGroup,',')" /> <xsl:for-each select="$items/value"> <xsl:value-of select="umbraco.library:GetPreValueAsString(number(current()))"/> </xsl:for-each> </xsl:if>
Can anybody suggest a solution. I'm using Umbraco V4.11
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
XSLT Data Type dropdown value id not text
I'm trying to get the value of a Data Type drop down that I have used in the property of my page.
I can easily get the text, but I need the value/id as I am using that to pass through to a query string on a search I have.
I've tried several different things and none of the following worked:
And this didn't work:
This didn't work either:
Can anybody suggest a solution. I'm using Umbraco V4.11
is working on a reply...