How to make a menu for a section

By default, menus in simple show a page's context within the entire website.  For large sites, however, it may be necessary only to show one section at a time.  A college may only want to show a menu for a single school within that school's pages.  A manufacturing company may only want to show a menu for one series of products at a time.  This effect can be achieved by using multiple templates and the simple common functions.

Step 1: Create the pages

 

Even if you don't make the pages available to the public yet, you'll need to have them created before you make any template changes.  Write down the PageID for the first page in the section for which you're making a new template.

Step 2: Copy your template and update links


Unless you plan to give the section a radically different design, you'll want to copy your main site template into a new folder.  If it's going to be using different graphics then make sure to update links to the CSS file and images.

Step 3: Edit the page menu

 

Open the template PHP file in a text editor and find the menu.  Instead of using GenerateMenuUL or GenerateMenu, use GenerateMenuToParentUL or GenerateMenuToParent.

<?PHP GenerateMenuToParentUL($CurrentPageID, $CurrentUserID, n , false, 10,000, true); ?>

Where n is the PageID you noted in Step 1.

Step 4: Add a new template

 

Login to the simple management console and go to the "tempates" tab.  Add a new template using the new file you just copied and edited.

Step 5: Update the page

 

Update the page at the root of the new section to use the new template.  Keep in mind that all pages in this section must use the template for the section.

Result: