Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic authored Nov 20, 2016
1 parent a539e2c commit e39eba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Because every project has different needs, wagtailmenus give you some fine grain
- **`OFF`** (value: `0`): Use only standard `Page` model data and methods, and make the minimum number of database methods when rendering. If you aren't using wagtailmenu's `MenuPage` model in your project, don't need to access any custom page model fields in you menu templates, and aren't overriding `get_url_parts()` or other `Page` methods concerned with URL generation, you should use this option for optimal performance.
- **`AUTO`** (value: `1`): Only use specific pages when needed for `MenuPage` operations (e.g. for 'repeating menu item' behaviour, and manipulation of sub-menu items via `has_submenu_items()` and `modify_submenu_items()` methods).
- **`TOP_LEVEL`** (value: `2`): As `AUTO`, but will always return 'specific' page instances for your top-level menu items (The pages selected as actual menu items). This is useful if you need to access custom page field values in your menu template for top-level items only (e.g. to add tooltip, help text, section colours or images)
- **`ALWAYS`** (value: `3`): Fetch and return specific page instances for all pages using as few database queries as possible, so that custom page-type data and methods can be accesssed in your menu template. You'll likely need to use this for multilingual sites, or if you have models that override `get_url_parts()` or other `Page` methods concerned with generating page URLs.
- **`ALWAYS`** (value: `3`): Fetch and return specific page instances for all pages using as few database queries as possible, so that custom page-type data and methods can be accesssed in your menu template. You'll likely need to use this for multilingual sites (multilingual field values won't be accesible from vanilla `Page` objects, you need the page instances to access those), or if you have models that override `get_url_parts()` or other `Page` methods concerned with generating page URLs.

All menu tags accept a `use_specific` option, allowing you to override any default settings, or the settings applied via the CMS to individual `MainMenu` and `FlatMenu` objects. As a value, you can pass in the integer value of any of the above options, e.g. `{% main_menu use_specific=2 %}`, or the following variables should be available in the context for you to use instead:

Expand Down

0 comments on commit e39eba4

Please sign in to comment.