{% if child.visible %}
{{ child.get_menu_title|safe}}
{% endif %}
{% comment %}
Bootsrap4 does not support submenues, so levels > 1 can't be handled be the main_menu tag and therfore
recursion has been dropped intentionally. Read https://github.com/twbs/bootstrap/pull/6342 for details.
{% endcomment %}
{% for grandchild in child.children %}
{{ grandchild.get_menu_title|safe }}
{% endfor %}
{% else %}
{{ child.get_menu_title|safe }}(current)
{% endif %}
{% endfor %}
{% endspaceless %}