Copied to clipboard

Flag this post as spam?

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


  • Inmedia 124 posts 176 karma points
    Apr 17, 2012 @ 09:32
    Inmedia
    0

    Checkbox list - Without comma separation

    Hi Umbracians

    I need help with the output of the checkbox list values.What I want is to add the values as classes for my list... As shown below:

    <li><xsl:attribute name="class"><xsl:value-of select="filter"/></xsl:attribute>
          <a href="{umbraco.library:NiceUrl(@id)}">
              <xsl:value-of select="@nodeName"/></h4>
          </a>
      </li>

     

    But the output I get is:

    class="class1,class2,class3" 

    I need it to be separated with a space instead of a comma, like this:

    class="class1 class2 class3"

    Can anyone tell me how to do that?

     

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Apr 17, 2012 @ 09:35
    Chriztian Steinmeier
    0

    Hi Inmedia,

    Simple "fix" in your case would be to use the translate() function:

    <xsl:value-of select="translate(filter, ',', ' ')" />

    /Chriztian

  • Inmedia 124 posts 176 karma points
    Apr 17, 2012 @ 09:48
    Inmedia
    0

    Awesome... I knew there had to be a simple solution... Thanks ;)

     

Please Sign in or register to post replies

Write your reply to:

Draft