Hessel
Hi I would like to change the sort order of the galleries list item on the front-end. I use year-categories. 2014 - 2015 -2016 -2017 and each year a new cattegorie is created. How ever I would like to change the sort order to the latest year created first displayed on the front-end . > 2017-2016-2015. I would really apriciate your help with this personal issue.
Kind regards
UpTop
Hi! Unfortunately this is currently not supported in this plugin. If you could add this as an issue over at the GitHub repo it would help to implement sorting sooner.
For the time being you could edit the component's code at line 58.
$this->page['categories'] = Category::orderBy('title','DESC')->get();
You should then edit the component's view to use the categories
variable instead of the galleries
variable.
{% for category in categories %}
{% for gallery in category.galleries %}
//html code
{% endfor %}
{% endfor %}
1-2 of 2