0%

Menus ID: DBT-HUCO-MEN

Menus are the primary way to manage navigation in Marketpath CMS. They are more or less what you would expect, with some extra functionality thrown in to enable "creative" use for things like mega-menus or tabbed menus.

Standard Menu Fields

A Marketpath CMS Menu has the following default field. Menus are not extendable with custom fields.

  • Name
  • Menu Items

Standard Menu Item Fields

A Marketpath CMS Menu Item has the following default fields. Menu Items are also not extendable with custom fields.

  • Name
  • Link
  • Open in New Tab
  • Image
  • Description
  • Content

The Image, Description, and Content fields are used when building more interactive navigation, such as mega-menus.

Default HTML

You can keep your templates clean and simple by outputting the default menu HTML. Here's the template code for rendering a menu with defautl HTML.

{% menu output_to_template = "Main Menu" %}

Here's the resulting output of a menu with three root-level items and two nested items under the Services section.

<div>
  <ul class="menu">
    <li><a href="https://mydomain.com/about-us"><span class="nav-title">About</span></a></li>
    <li><a href="https://mydomain.com/services-landing"><span class="nav-title">Services</span></a>
        <ul class="sub-menu">
          <li><a href="https://mydomain.com/bookkeeping"><span class="nav-title">Bookkeeping</span></a></li>
          <li><a href="https://mydomain.com/tax-preparation-consultation"><span class="nav-title">Tax Prep and Consultation</span></a></li>
        </ul>
    </li>
    <li><a href="https://mydomain.com/contact-us"><span class="nav-title">Contact Us</span></a>
  </ul>
</div>

Of course, you can customize this default output however you'd like by building your own menu rendering code. For the majority of common use-cases, the default menu output should be sufficient for your sites. Just splash a little bit of style over it, make it responsive, and run with it.



Feedback?

Please fill out the form below with your feedback or any questions you may have after working through the "Menus" lesson.

Your Name
Email 
Feedback / Questions