This placeholder allows you to sort maps and lists in Velocity.

Methods

Name Type Description
$sort.asc(unsortedList) List<String>

Returns the list in ascending order.

Parameter Type Description
unsortedList List<String> The list which needs to be sorted.
$sort.asc(unsortedMap) Map<String,String>

Returns the map in ascending order by key.

Parameter Type Description
unsortedMap Map<String,String> The map which needs to be sorted.
$sort.ascByValue(unsortedMap) Map<String,String>

Returns the map in ascending order by value.

Parameter Type Description
unsortedMap Map<String,String> The map which needs to be sorted.
$sort.desc(unsortedList) List<String>

Returns the list in descending order.

Parameter Type Description
unsortedList List<String> The list which needs to be sorted.
$sort.desc(unsortedMap) Map<String,String>

Returns the map in descending order by key.

Parameter Type Description
unsortedMap Map<String,String> The map which needs to be sorted.
$sort.descByValue(unsortedMap) Map<String,String>

Returns the map in descending order by value.

Parameter Type Description
unsortedMap Map<String,String> The map which needs to be sorted.