Create a free account to get access to additional free training videos. Enjoy this free video from CraftQuest! Create a free account to get access to additional free training videos. Join the Community

Creating Navigation in Craft CMS

Structure-Powered Navigation

Another option when tackling navigation is to tie your content structure and navigation closely together using the Structure section to power the navigation.

Anoth­er option when tack­ling nav­i­ga­tion is to tie your con­tent struc­ture and nav­i­ga­tion close­ly togeth­er using the Struc­ture sec­tion to pow­er the navigation.

In this exam­ple, each top-lev­el entry in the Struc­ture would be the nav­i­ga­tion item. And, option­al­ly, each child item in the Struc­ture would be a drop-down menu item (like we did with Quests ear­li­er in this article).

To use just top-lev­el items in the nav­i­ga­tion, we fetch the entries with an ele­ment query and spec­i­fy only the first lev­el using the level parameter.

Creating Navigation in Craft CMS is made up of the following videos: