Copied to clipboard

Flag this post as spam?

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


  • FarmFreshCode 225 posts 422 karma points
    Jan 21, 2014 @ 19:17
    FarmFreshCode
    0

    Using umbraco.library:Replace with Repeatable Custom Content

    So I have used the Repeatable Custom Content dataType. I want to be able to list out the data in a comma delimited list.. but not have a comma at the very end. Below is my current script:

    <xsl:for-each select="$currentPage/facultyDegreesFull/items/item">

    <xsl:value-of select="umbraco.library:Replace(./data [@alias = 'degreeAbbrev'], ',', ', ')"/>
                   
    </xsl:for-each>

    However this gives me a result that looks like this:
    Item #1Item #2Item #3

    But what I want it to look like is:
    Item #1, Item #2, Item #3

    Usually when I write out umbraco.library:Replace like this is works just fine, but I'm not sure what I can do to accomodate the Repeatable Custom Content data.

    any thoughts??

  • FarmFreshCode 225 posts 422 karma points
    Jan 21, 2014 @ 19:45
    FarmFreshCode
    100

    Solved it myself:

    <xsl:for-each select="$currentPage/facultyDegreesFull/items/item">

    <xsl:value-of select="./data [@alias = 'degreeAbbrev']"/><xsl:if test="position()!=last()">, </xsl:if>

    </
    xsl:for-each>

    Boom...

Please Sign in or register to post replies

Write your reply to:

Draft