{% if app.request.attributes.get('primary') is not empty and app.request.attributes.get('primary') in constant('Cms\\TenantBundle\\Entity\\TenantTypeEmbeddable::PRIMARY') and constant('Cms\\TenantBundle\\Entity\\TenantTypeEmbeddable::SECONDARY')[app.request.attributes.get('primary')] is not empty %}
{% embed '@ui/common/navbars/default.html.twig' with {
title: 'Types'
} %}
{% block items %}
{% include '@ui/common/navbars/items/default.html.twig' with {
text: 'All',
link: path(routes.list, {
primary: app.request.attributes.get('primary')
}),
active: (app.request.attributes.get('secondary') is empty)
} %}
{% for secondary in constant('Cms\\TenantBundle\\Entity\\TenantTypeEmbeddable::SECONDARY')[app.request.attributes.get('primary')] %}
{% include '@ui/common/navbars/items/default.html.twig' with {
text: 'campussuite.cms.tenant.types.secondary.%s.%s'|format(app.request.attributes.get('primary'), secondary)|trans,
link: path(routes.list, {
primary: app.request.attributes.get('primary'),
secondary: secondary
}),
active: (app.request.attributes.get('secondary') is same as(secondary))
} %}
{% endfor %}
{% endblock %}
{% endembed %}
{% endif %}