You can create as many menus as you like. Menu items can then be easily added, edited, and removed from the back office for each menu.
Creating a menu, even if it may seem simple, still requires some knowledge of HTML and CSS. You may also need to modify HTML and CSS to correctly display the menu on the store and in the desired style.
Before you can add a new menu to a template page, you must define it in the editor.json file.
"menus" field add the following:
{
"menu" : "Company",
"label" : {
"en" : "About Us",
"it" : "Chi Siamo"
}
}
Company you should provide the name used to reference the menu in template code. The name must start with a capital letter and must not contain spaces (more precisely, it must follow the syntax of a Go identifier).import instruction at the beginning of the file, as the first line or second line if the first line is an extends instruction:
{% import "/imports/menu.html" %}
provided that the "/imports/menu.html" import is not already present.
show instruction where you want to display the menu:
{% show Menu(menus.Company, "vertical")
where instead of Company you should write the name of the menu to display. If the menu should appear horizontally, replace "vertical" with "horizontal".