Add navigation to your theme
In this tutorial, you'll learn how to add navigation to your theme.
Implementing navigationAnchor link to section titled "Implementing navigation"
To add navigation to your theme, you can use the
linklists object to find the menu that you want to output. The default menu is the Main menu, which can be accessed with it’s handle
For each menu link, you should output information such as the title and URL. You might also want to output the link's child links. You can nest links up to three levels deep, and you can access them through the
links attribute of the
For example, if you've created a
link_list type setting called
menu, so that merchants can choose the menu they want to use in the header section, then the following code shows how you might output the menu.
Depending on the kind of navigation you're building, you should include your navigation code in your header or footer sections.