Skip to content

Adding more template options for a node type or submenu

Ola Frankowska edited this page Aug 8, 2023 · 2 revisions

This feature allows you to add multiple custom templates for menu node types and submenu. As a result, it will be possible to select the new templates in menu settings in admin:

Screenshot 2023-08-08 at 13 12 38

Create a directory inside your theme that will contain the custom templates. Directory structure should look like this:

Snowdog_Menu
  └─ templates
    └─ {menu_identifier (optional)}
      └─ menu
        └─ custom
          └─ {custom_template_directory}
            └─ {custom_template}.phtml
  • {menu_identifier}: the identifier that you enter when you create a menu in admin. This directory is optional. If you add it, then templates will be only available for the specific menu. Otherwise, you'll be able to select them for any menu.
  • {custom_template_directory}: name of a node type (check node types) or sub_menu.
  • {custom_template}.phtml: custom template. The name of the file will be used inside the template selector in admin. Use a different name than the node type name/sub_menu. You can add multiple templates.