Try the beta version of the new SilverStripe documentation

For the next 2 weeks you can use the new documentation website and give us your feedback.


This document contains information about a future release and not the current stable version (3.1).

Be aware that information on this page may change and API's may not be stable for production use.

How to create a navigation menu

In this how-to, we'll create a simple menu which you can use as the primary navigation for your website.

Add the following code to your main template, most likely the "Page" template in your theme, located in themes/<mytheme>/templates/

    <% loop $Menu(1) %>      
      <a href="$Link" title="Go to the $Title page" class="$LinkingMode">
     <% end_loop %> 

More details on creating a menu are explained as part of "Tutorial 1: Building a basic site", as well as "Page type templates" topic.


Comment policy: Please use comments for tips and corrections about the described functionality.
Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant. Use the Silverstripe Forum to ask questions.

blog comments powered by Disqus