We have moved!
You are currently looking at documentation for Umbraco 8 and older versions.
Go to docs.umbraco.com for documentation for Umbraco 9 and newer versions.
Master Template - The Navigation Menu
Now let's fix the navigation menu. There are two ways of doing this.
- You could have Umbraco dynamically create a navigation menu from the pages it has in the Content Tree (Hint: see the list child pages macro we create later..). Whenever an editor creates a page it automatically appears or,
- You can hardcode it.
We're going to hardcode this for now. It's a good idea as you start building a site to hard code this so you can move around testing before you replace this. We'll leave it to you as an exercise to do this later. Edit your Master template - edit the
<li> items under the
<nav> tags to say:
<nav> <ul> <li><a href="/">Home</a></li> <li><a href="/contact-us">Contact Us</a></li> <li><a href="/articles">Articles</a></li> </ul> </nav>
Figure 34 - Master Template - Menu / Nav Section
Save your changes and let's test our menu. You'll find that clicking on the Article link throws an Umbraco error as we've not created this page yet. Let's do that now.
How to have a parent page that lists and links to the child nodes automatically (e.g. Articles home with infinite articles - useful for Blogs or News pages).