Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MarkD 5 posts 26 karma points
    Jul 16, 2011 @ 13:47
    MarkD
    0

    Beginner Question: How to assign a Vairable from a Field in a template

    Hi,

    I have a Property in one of my templates with an alias of specialityList.

    I know I can write the value out using: <xsl:value-of select="specialityList"/>

    However, is there a way to assign the value to a vairable?

    Thank you,
     

  • MarkD 5 posts 26 karma points
    Jul 16, 2011 @ 14:10
    MarkD
    0

    Hi,

    I have just found the answer I was looking for:

    <xsl:variable name="selectedValues" select="$currentPage/specialityList"/>
    <xsl:if test="contains($selectedValues, 'AHP')"> do something </xsl:if>

    Thanks to this post: http://our.umbraco.org/forum/developers/xslt/21135-IF-CheckBoxList-Contains 

    Thanks,

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies