diff options
author | Daniel Weipert <code@drogueronin.de> | 2021-03-10 16:13:52 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2021-03-10 16:13:52 +0100 |
commit | 9b8832902cc1a51b5c6e2e0890c576372a60e5e1 (patch) | |
tree | e7f1db7c2e920b63bde306fda71c187d44a7c6c1 /resources/views/components |
Diffstat (limited to 'resources/views/components')
-rw-r--r-- | resources/views/components/menu-item.twig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/views/components/menu-item.twig b/resources/views/components/menu-item.twig new file mode 100644 index 0000000..5bc41fc --- /dev/null +++ b/resources/views/components/menu-item.twig @@ -0,0 +1,10 @@ +<li class="{{ (item.classes | merge(item._menu_item_classes)) | join(' ') }}"> + <a target="{{ item.target }}" href="{{ item.link }}">{{ item.title }}</a> + {% if current_depth < depth and item.children %} + <ul> + {% for child in item.children %} + {% include 'components/menu-item.twig' with { 'item': child, 'depth': depth, 'current_depth': current_depth + 1 } %} + {% endfor %} + </ul> + {% endif %} +</li> |