Basic

Last updated: February 11th 2020

This is one line of easy to add code. Synax is {exp:super_navigation:basic}

You can't use custom variables in basic tag. For any kind of changes you have to use custom tag.

Parameters

To identify which navigation to call, this is required parameter. (you can also use nav_short_name parameter in place of nav_id)

nav_id="1" }}

To identify which navigation to call, this is required parameter. (you can also use nav_id parameter in place of nav_short_name)

nav_short_name="header_navigation" }}

site_id

If you are using MSM and wants to show site 1 menu in site 2, you can use this parameter to tell plugin to bring MSM site menu.

wrap

You can wrap basic navigation with either <ul> or <ol>. Default is <ul>

wrap="ul" }}
wrap="ol" }}

disable

For categories and entries URL patterns, We gives facility to bring categories and entries with category parents. That runs extra queries in backend, If you not wish to run those queries and not wish you to bring parent categories to be added into URL, You can pass this parameter.

Right now only 1 item is added into disable parameter that is parent_uri

disable="parent_uri" }}
// OLD output
http://example.com/blog/category1/category2/blog-url-title

// New output
http://example.com/blog/category2/blog-url-title }}

parent_only (yes/no)

If you pass this parameter, All the childrens will be ignored and you will get level 1 menu only. (This parameter can be use with combination of parent_id parameter so you can get single level of any children tree.)

parent_id

All the links you create got a unique ID. We default start navigation from 0 (beginning). If you want to start navigation from middle of somewhere, you can pass this parameter and navigation will start from that point.

include_self

This parameter is only working when you are passing parent_id parameter. If you pass parent_id to some link, all the children of that parent will show in the menu. You have to pass this parameter to show that parent link to the menu. (Default is no)

include_self="yes" }}

max_level

You can pass this parameter to get a limited level of Navigation links.

ul_class

If you wish to add classes to all the wrapper, you can add it here. In basic navigation, all your wrapper can be either <ul> or <ol>.

You can pass level wise different classes or single class to add into all the level.

ul_class="nav"
// All wrapper will assign this class. }}
ul_class="level-1|level-2|level-3|level-4"
Level 1 class => level-1
Level 2 class => level-2
Level 3 class => level-3
Level 4 class => level-4 }}

active_ul_class

If you wish to add a class to all the active wrapper, you can add it here. If any link is active, this class will be added to way to all the parent <ul>

active_ul_class="active" }}

li_class

If you wish to add classes to all the li, you can add it here.

You can pass level wise different classes or single class to add into all the level.

li_class="nav-li"
// All <li> will assign this class. }}
li_class="level-1|level-2|level-3|level-4"
Level 1 <li> class => level-1
Level 2 <li> class => level-2
Level 3 <li> class => level-3
Level 4 <li> class => level-4 }}

active_li_class

If you wish to add a class to all the active <li>, you can add it here. If any link is active, this class will be added to way to all the parent <li>.

If you wish to add classes to all the <a> tag, you can add it here.

You can pass level wise different classes or single class to add into all the level.

link_class="nav-link"
// All <a> will assign this class. }}
link_class="level-1|level-2|level-3|level-4"
Level 1 <a> class => level-1
Level 2 <a> class => level-2
Level 3 <a> class => level-3
Level 4 <a> class => level-4 }}

If you wish to add a class to all the active <a>, you can add it here.

no_results_text

You can add no results text here. It will show when there is no links found in the navigation group or navigation group not found!

Examples

Here is few examples of basic super navigation tag.

Simple Navigation
{exp:super_navigation:basic nav_id="1"}
Simple Navigation with nav short name
{exp:super_navigation:basic nav_short_name="header_navigation"} }}
Large example
{exp:super_navigation:basic
	nav_short_name="header_navigation" disable="parent_uri" prefix="nav"
	wrap="ol"
	active_ul_class='ul_active'
	active_li_class='li_active'
	active_link_class='link_active'
	ul_class='my-ul-1|my-ul-2|my-ul-3|my-li-4|my-li-5'
	li_class='my-li-1|my-li-2|my-li-3|my-li-4|my-li-5'
	link_class='my-link'
	no_results_text="No Nav found :("
} }}