Vertical Primary Navigation

The default Mura theme, MuraBootstrap, comes with a horizontal primary navigation structure. However, there may be times when you need to have a vertically-oriented one.

Bootstrap comes with several built-in navigation styles from tabs, pills, and lists to the popular navbar that's become so popular on the web today. Let's take a look at the code that's generated by Mura for the primary navigation:

The output is simply some div tags, anchor tags, and unordered lists. As a front-end developer, you already know that the display of this output is controlled by CSS. So whether you're using MuraBootstrap or your own custom CSS, you have complete control over the end result. Mura will generate the output, all you need to do is supply the CSS.

Follow these steps to see the entire primary navigation go from horizontal, to vertical:

  1. Create a new file called vertical_nav.cfm and place it in your theme's template/inc/ directory:

  2. Open the file that's responsible for the current primary navigation located at:

  3. Locate, then copy the following snippet of code:

  4. Paste the code into your vertical_nav.cfm file.
  5. Then wrap the output with the following code:

  6. Save the file.
  7. Open the two_column_SL.cfm file, and comment out the following line of code:

  8. In the <aside class="span3 sidebar">, enter the following code:

  9. Create a new Page under the Labs folder called Vertical Nav.
    1. Go to the Layout & Objects tab
    2. Select two_column_SL.cfm for the Layout Template
    3. Publish and then preview the page.