Copied to clipboard

Flag this post as spam?

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


  • Sean Dooley 289 posts 528 karma points
    Jul 05, 2013 @ 17:47
    Sean Dooley
    0

    Group CSV list of child node ID's by their parent node ID's

    Using the uComponents Checkbox Tree I have of a CSV list of child node ID's as follows

    1854,1856,6241,2122

    On the front-end of the site, I would like to render the selected child node ID's grouped by their parent ID's. For example

    1850
    - 1854
    - 1856
    6240
    - 6241
    2120
    - 2122

    Any ideas on how to do this using XSLT?

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Jul 08, 2013 @ 00:58
    Chriztian Steinmeier
    0

    Hi Sean,

    You would do that by getting a nodeset of the actual nodes and then grouping them by their @parentID attribute. Sounds simple, right? :-)

    The thing is, grouping is tricky in XSLT (1.0) - it's perfectly doable but it looks like VooDoo magic ... it's further complicated by the fact that yoou're using CSV output instead of XML for the CheckBox Tree, which means you need some extra trickery to get the actual nodes.

    So are you still looking for a solution or did you solve it in another way? Do you need it to be XSLT using the CSV output? If so, I'll gladly help you get there :-)

    /Chriztian 

Please Sign in or register to post replies

Write your reply to:

Draft