Skip to content

Commit

Permalink
Update menu.md
Browse files Browse the repository at this point in the history
Fix examples for menu parameters
  • Loading branch information
logansam authored Jul 31, 2023
1 parent 6cb6f43 commit 3c0ea6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/twig-components/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ arguments in Twig. For example:
{{ menu(
identifier = 'foo',
template = 'partials/_menu_foo.twig',
params = {'withsubmenus': false, 'class': 'myclass'}
class = 'myclass'
withsubmenus = false
) }}
```

Which is equivalent to this shorthand version:

```twig
{{ menu('foo', 'partials/_menu_foo.twig', {'withsubmenus': false, 'class': 'myclass'}) }}
{{ menu('foo', 'partials/_menu_foo.twig', 'myclass', false) }}
```

Doing this will render the menu `foo`, using the template `_menu_foo.twig`. The
Expand Down

0 comments on commit 3c0ea6f

Please sign in to comment.