Copied to clipboard

Flag this post as spam?

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


  • Tom Maton 387 posts 659 karma points
    Sep 29, 2009 @ 16:54
    Tom Maton
    0

    Splitting a GetPreValue result into list items

    Hi All,

    I have a datatype which is just a drop down list which the client can add to.

    What I need to do is retrieve all those items from that datatype and build a unordered list of the items.

    I have used the GetPreValues and returned the data but there doesn't seem any way to split them and place into seperate list items as they are not sepereated by comma, tab etc.

    Any help greatly appreciated

    Tom

  • Tom Maton 387 posts 659 karma points
    Sep 29, 2009 @ 17:03
    Tom Maton
    0

    Solved it!!

    Moment of holiday madness!!

    This is what I did

    declared the GetPreValue variable:

    <xsl:variable name="topicList" select="umbraco.library:GetPreValues('2014')"/>

    For each loop of each item

    <ul>
    <xsl:for-each select="$topicList//preValue">
                    <li>
                      <a href="#">
                        <xsl:value-of select="current()" />
                      </a>
                    </li>
                  </xsl:for-each>
    </ul>
  • 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