Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Order by number of childrens

Started by Rea 9 years ago · 0 replies · 713 views
9 years ago

How can i order by number of childrens?

ex:
{% for page in page.find('/blog').children.order( page.children|length ) %}
<a href="{{ page.url }}">{{ page.title|split(' ')|slice(0, 1)|join }} <sup>{{ page.children|length }}</sup></a>
{% endfor %}

need this
category<sup>10</sup>, category<sup>5</sup>, category<sup>2</sup>

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by MarkP, 7 days ago
3 120 3 days ago
Themes & Styling · by TomW, 6 days ago
0 64 6 days ago
Themes & Styling · by themetman, 2 weeks ago
1 159 1 week ago
Themes & Styling · by AH, 4 weeks ago
1 274 2 weeks ago
Themes & Styling · by Bruno, 4 years ago
6 1457 2 weeks ago