I want to show attributes of a product that will show max 5 attributes value. I am following this way for showing attributes & working fine but how do i show max 5 in this list ? is there any way to set the length / limit of the list ?
here is the code :
Code: Select all
<div class="spec-list">
{% for attribute in attribute_group.attribute %}
<ul>
<li>{{ attribute.text }}</li>
</ul>
{% endfor %}
<div>
Code: Select all
.spec-list li:nth-child(n + 6) {
display:none!important;
}
Thank you All Friends !