Back to data overview

View Example 7: Hierarchical ordering

SWAC has the ability to order outputs from datasets hierarchcally.
To activate this functionality there are four components needed.
1. swac_id attribute. This attribute must be noted at the tag that can be the parent. It contains the id of the dataset.
2. swac_parent. This attribute must be noted at the tag. It contains the id of the parent dataset.
3. swac_forChilds. This class declears an element as "use this if there are childs and put the childs into there"
4. swac_child. This class declares an element as "use this tag as representation, if the set is used as child".

VIEW-Requestor

<div id="view_example7" swa="Present FROM ../../data/concepts/view_example7.json">
    <ol>
        <li class="swac_repeatForSet" swac_id="{id}" swac_parent="{parent}">
            {name}
            <ol class="swac_forChilds">
                <li class="swac_child" swac_id="{id}" swac_parent="{parent}">
                    > {name}
                    <ol class="swac_forChilds">
                        <li class="swac_child" swac_id="{id}" swac_parent="{parent}">
                            >> {name}
                        </li>
                    </ol>
                </li>
            </ol>
       </li>
    </ol>
</div>  
        
CONFIGURATION

No configuration needed

DATASOURCE
  1. {name}
    1. > {name}
      1. >> {name}
Back to data overview