Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Statamic Menu
<ul id="menu" class="menu">
{{ if menu }}
{{ menu }}
<li{{ if submenu }} class="has-submenu"{{ endif }}>
<a href="{{ url }}"{{ if target }} target="{{ target }}"{{ endif }}>{{ name }}</a>
{{ if submenu }}
<ul class="submenu">
{{ submenu }}
<li><a href="{{ url }}"{{ if target }} target="{{ target }}"{{ endif }}>{{ name }}</a></li>
{{ /submenu }}
</ul>
{{ endif }}
</li>
{{ /menu }}
{{ else }}
{{ nav from="/" }}
<li><a href="{{ url }}">{{ title }}</a></li>
{{ /nav }}
{{ endif }}
</ul>
menu:
-
name: News
url: /news
-
name: Broadcasts
url: /broadcasts
-
name: Cup
url: /cup-series
-
name: Truck
url: /truck-series
submenu:
-
name: Schedule
url: /truck-series/schedule
-
name: Standings
url: #
-
name: National
url: /grand-national-series
-
name: Forums
url: http://norl.proforums.com/
target: _blank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment