Skip to content

Commit

Permalink
Document active menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroennoten committed Aug 20, 2016
1 parent 8f76b06 commit ef8d5b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ A more practical example that actually uses translations and the database:

This event-based approach is used to make sure that your code that builds the menu runs only when the admin panel is actually displayed and not on every request.

### Active menu items

By default, a menu item is considered active if any of the following holds:
- The current path matches the `url` parameter
- The current path is a sub-path of the `url` parameter
- If it has a submenu containing an active menu item

To override this behavior, you can specify an `active` parameter with an array of active URLs, asterisks and regular expressions are supported.

## Translations

Expand Down

0 comments on commit ef8d5b4

Please sign in to comment.