============================== Wagtailmenus 2.9 release notes ============================== .. contents:: :local: :depth: 1 What's new? =========== Menu tags will now automatically identify level-specific templates ------------------------------------------------------------------ To make it easier to define templates for menus with three or more levels, each menu class has been updated to look for and use level-specific templates in your template directory. For example, for a main menu with three levels, you could arrange your templates like so: :: templates └── menus └── main ├── level_1.html ├── level_2.html └── level_3.html With this the arrangement, the ``{% main_menu %}`` tag would find and use ``level_1.html`` to render the first level of menu items, then any calls made to ``{% sub_menu %}`` from within that template would use ``level_2.html``, then any further calls to ``{% sub_menu %}`` from that template would use ``level_3.html``. See the updated documentation for more information and examples: :ref:`custom_templates_auto` New 'sub_menu_templates' menu tag option allows you to specify templates for multiple levels --------------------------------------------------------------------------------------------- To complement the new level-specific template functionality, a new ``sub_menu_templates`` option has been added to the ``main_menu``, ``flat_menu``, ``section_menu`` and ``children_menu`` tags to allow you to specify multiple templates to use at different levels. For example, if you had a template (e.g ``abc.html``) that you'd like to use for the second level of a section menu, and another (e.g. ``xyz.html``) that you'd like to use for the third, you could specify that by doing the following: .. code-block:: html {% section_menu max_levels=3 sub_menu_templates="path_to/abc.html, path_to/xyz.html" %} See the updated documentation for more information: :ref:`template_tag_reference` Disable 'Main menu' or 'Flat menu' management options in the Wagtail admin area ------------------------------------------------------------------------------- Implemented by Michael van de Waeter (@mvdwaeter). Projects come in all shapes and sizes, and not all call for both types of menu. So, to reduce potential confusion for users in the CMS, you can now hide either (or both) the 'Flat menus' and 'Main menu' items from the 'Settings' menu in the admin area (and disables the underlying CMS functionality for each). See the settings documentation for more information: :ref:`MAIN_MENUS_EDITABLE_IN_WAGTAILADMIN` :ref:`FLAT_MENUS_EDITABLE_IN_WAGTAILADMIN`