Skip to content

Instantly share code, notes, and snippets.

@Codenator81
Created July 30, 2015 19:23
Show Gist options
  • Save Codenator81/6a0ae73f7ba2b8a5397b to your computer and use it in GitHub Desktop.
Save Codenator81/6a0ae73f7ba2b8a5397b to your computer and use it in GitHub Desktop.
Drupal 8 menu without link example
{% if item.url.RouteName() == "<none>" %}
<a>{{ item.title }}</a>
{% else %}
{{ link(item.title, item.url) }}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment