In the D7 version of this module there was an option to activate first/last classes on li. I found this useful, are there any plans to port that feature to the D8 version?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Selfirian created an issue. See original summary.

v.belous’s picture

Assigned: Unassigned » v.belous
v.belous’s picture

This patch includes a settings form for Superfish module. This form include option - add first/last classes for li elements. Form settings are useful for modifying the module in the future.

v.belous’s picture

Exists another way for this issue - change only superfish-menu-items.html.twig file
We can use "special variables" loop.first and loop.last
Example:
{% for elem in arrMenu %}
{% if loop.first %}
// some html element with "first" class
{% elseif loop.last %}
// some html element with "last" class
{% else %}
// some html element without classes
{% endif %}
// some html structure
{% endfor %}

If you need this I can add this way in the new patch

v.belous’s picture

Status: Active » Needs review