Hi I am new to umbraco I have a question. I have a Radiobox Datatype (Radiobutton list) with two values. (Text: Danish, Value: 73) and (Text: International, Value: 74)
I would like to set up an if statement, which toggles between two images if you choose Danish (73) or International (74), but I can not figure out how. I think I've gone through most posts here.
One way of doing this could be to create a xsl:choose like this:
<xsl:choose> <xsl:when test="$currentPage/radioboxAlias='73'"> image 1 here </xsl:when> <xsl:otherwise> image 2 here if the admin didn't choose the 'Danish'-option </xsl:otherwise> </xsl:choose>
The above code will check to see if the Danish-option is selected. If that's not the case (if the International-option is selected, or none of them are selected), the image number 2 will be inserted.
You could also create two xsl:if's instead, or change the xsl:otherwise to a xsl:when in the above code. There are a lot of different ways of doing this.
xslt if radiobuttons
Hi I am new to umbraco
I have a question. I have a Radiobox Datatype (Radiobutton list) with two values.
(Text: Danish, Value: 73) and (Text: International, Value: 74)
I would like to set up an if statement, which toggles between two images if you choose Danish (73) or International (74), but I can not figure out how. I think I've gone through most posts here.
hope someone can help me.
Benji.
Hi there Benji.
One way of doing this could be to create a xsl:choose like this:
The above code will check to see if the Danish-option is selected. If that's not the case (if the International-option is selected, or none of them are selected), the image number 2 will be inserted.
You could also create two xsl:if's instead, or change the xsl:otherwise to a xsl:when in the above code. There are a lot of different ways of doing this.
/Kim A
is working on a reply...