Answer the question
In order to leave comments, you need to log in
How to display the first 6 menu items and not all at once in opencart code?
There is this code:
<ul class="us-footer-list list-unstyled">
{% for information in informations %}
<li class="us-footer-item us-footer-information"><a href="{{ information.href }}" {% if information.rel is defined and information.rel %}rel="nofollow"{% endif %} class="us-footer-link">{{ information.title }}</a></li>
{% endfor %}
</ul>
Answer the question
In order to leave comments, you need to log in
Since you are using Twig as your template engine, you can do this :
<ul class="us-footer-list list-unstyled">
{% for information in informations | slice(0, 6) %}
<li class="us-footer-item us-footer-information"><a href="{{ information.href }}" {% if information.rel is defined and information.rel %}rel="nofollow"{% endif %} class="us-footer-link">{{ information.title }}</a></li>
{% endfor %}
</ul>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question