summaryrefslogtreecommitdiff
path: root/resources/views/components
diff options
context:
space:
mode:
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>