summaryrefslogtreecommitdiff
path: root/resources/views/components
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2021-03-10 16:13:52 +0100
committerDaniel Weipert <code@drogueronin.de>2021-03-10 16:13:52 +0100
commit9b8832902cc1a51b5c6e2e0890c576372a60e5e1 (patch)
treee7f1db7c2e920b63bde306fda71c187d44a7c6c1 /resources/views/components
Initial commitHEADv1.0.0main
Diffstat (limited to 'resources/views/components')
-rw-r--r--resources/views/components/menu-item.twig10
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>