Overview
Originally, the arrays in the template editor for visualizers are sorted alphabetically. This article shares the process of sorting them by properties.
Process
- Log into your DNN instance.
- Go to Content > Content Library > Visualizers > Choose a Visualizer.
- Open the Editor tab.
- Modify the following sample code as needed. In this example, the code assigns the
storeLocations
property to the locations variable and sorts by thecontentName
property.
{% assign locations = storeLocations | sort: 'contentName' -%}
{% for item in locations -%}
<div class="storeLoc">
{{item.contentName}}
</div>
{% endfor -%} - Place the code in the Template section and save.
Comments
0 comments
Please sign in to leave a comment.