Copied to clipboard

Flag this post as spam?

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


  • Bradley Richmond 2 posts 32 karma points
    Jun 18, 2013 @ 15:20
    Bradley Richmond
    0

    Adding commas to a string XSLT

    Hello,

    This is probably abit of a newbie questin so i apologies in advance.

    I'm getting a string which contains a list of nodeid from a MultiNode Content Picker, i need to get these id to be comma delimited but i m having difficulty. i could do the following:

      <xsl:variable name="SinkVal" select="$currentPage/data [@alias = 'sink']"/>
      
      <xsl:variable name="SubVal" select="substring($SinkVal, 0, 5)"/>

     

    to get each value then append a comma to the end, then get each id using this methosd but it seems a really long way of solving the problem. 

    Woudl anyone be able to suggest a way i could tackle this problem.

    Thank you very much

    Bradley

  • Rich Green 2246 posts 4008 karma points
    Jun 19, 2013 @ 10:13
    Rich Green
    100

    Hey Bradley,

    If you set the MultiNodeTreePicker to store CSV rather than XML then you will already have what you need right?

    http://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors/Multi-Node-Tree-Picker

    Rich

  • Rich Green 2246 posts 4008 karma points
    Jun 19, 2013 @ 10:13
    Rich Green
    0

    Oh, and welcome to the Forum! 

  • Bradley Richmond 2 posts 32 karma points
    Jun 19, 2013 @ 10:20
    Bradley Richmond
    0

    Hi Rich,

    Thank you very much. I've just read the information on the data type whilst changing it to CSV.. Dohhhh. if only i read thr options properly.

    Thank you very much.

    Bradley  

  • Rich Green 2246 posts 4008 karma points
    Jun 19, 2013 @ 10:23
    Rich Green
    0

    Hey Bradley,

    No problem, hope you're enjoying Umbraco.

    Please remember to mark the solution as solved if you can so people know it's solved and then can find the answer if they need it too.

    Cheers

    Rich

Please Sign in or register to post replies

Write your reply to:

Draft