Skip to content

Commit 3525f40

Browse files
Added twig variant
1 parent d330c37 commit 3525f40

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/overview.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,20 @@ Besides these, you can also simply use the menus in Blade templates and render t
4545
@endforeach
4646
</div>
4747
```
48+
49+
```twig
50+
<div class="menu">
51+
{% for item in menu.items %}
52+
{% if item.isAllowed() %}
53+
<div class="menu-item">
54+
{% if item.hasLink %}
55+
<a href="{{ item.url()|raw }}">{{ item.title }}</a>
56+
{% else %}
57+
{{ item.title }}
58+
{% endif %}
59+
</div>
60+
{% endif %}
61+
{% endfor %}
62+
</div>
63+
64+
```

0 commit comments

Comments
 (0)