{% set i = 1 %}
{% for menu in menus %}
{% if menu.intname == '' %}
<li class="{{ intname == 'mainpage' ? 'active ' : '' }}{{ intname == 'checkout' ? ' visible-xs' : '' }}">
<form action="{{ path('redirect') }}" method="post">
<button type="submit" name="redirect" value="{{ path('home') }}"><i class="fa fa-{{ menu.icon }}"> </i>{{ menu.name |raw }}</button>
</form>
</li>
{{ render_esi (url('block_catmenu', {'template': 'topmobilecatmenu'})) }}
{% else %}
<li class="{{ (menu.intname|replace({'/': ''}) in intname) ? 'active ' : '' }}{{ page.intname == 'checkout' ? ' visible-xs' : '' }}">
<form action="{{ path('redirect') }}" method="post">
<button type="submit" name="redirect"{{ menu.intname == 'catalog/action' ? ' class="tm-action"' }} value="{{ '/' ~ app.request.locale ~ '/' ~ menu.intname }}"><i class="fa fa-{{ menu.icon }}"> </i>{{ menu.name |raw }}</button>
</form>
</li>
{% endif %}
{% endfor %}