Answer the question
In order to leave comments, you need to log in
Twig question. How to display a multiple of three categories?
On the main page of my site on OpenCart CMS, the list of categories is displayed through
{% for category in categories %}
{% endfor %}
How can I make this for end at the largest multiple of 3?
So that, for example, if the site has 4 or 5 categories, it displays only three of them, and if there are 7 or 8, then 6, and so on by analogy. Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question