Structure Nav

Developer

Rob Sanchez

3rd Party (Free)

83 downloads (last 90 days)

Download v1.0.6

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

ExpressionEngine plugin for making custom Structure navigation using a tag pair.

Parameters

Same parameters as {exp:structure:nav}, except those which effect HTML or CSS class/id.

Variables

All tags are prefixed based on their depth. The tag prefixes go in this order:

root
child
grandchild
great_grandchild
great_great_grandchild
etc.

The basic tag has these variables (where is one of the depth levels listed above)

{<prefix>:entry_id}
{<prefix>:title}
{<prefix>:page_url}
{<prefix>:page_uri}
{<prefix>:count}
{<prefix>:total_results}
{if <prefix>:active}{/if}
{if <prefix>:has_active_child}{/if}
{if <prefix>:has_children}

There is also the children tag pair:

{<prefix>:children}
  {<next prefix>:entry_id}
  {<next prefix>:title}
  {<next prefix>:children}
    {<next next prefix>:entry_id}
  {/<next prefix>:children}
{/<prefix>:children}

Which would look like this with real prefixes:

{root:children}
  {child:entry_id}
  {child:title}
  {child:children}
    {grandchild:entry_id}
  {/child:children}
{/root:children}

The advanced tag adds the following tags and also any custom fields:

{<prefix>:site_id}
{<prefix>:channel_id}
{<prefix>:author_id}
{<prefix>:forum_topic_id}
{<prefix>:ip_address}
{<prefix>:url_title}
{<prefix>:status}
{<prefix>:versioning_enabled}
{<prefix>:view_count_one}
{<prefix>:view_count_two}
{<prefix>:view_count_three}
{<prefix>:view_count_four}
{<prefix>:allow_comments}
{<prefix>:sticky}
{<prefix>:entry_date}
{<prefix>:year}
{<prefix>:month}
{<prefix>:day}
{<prefix>:expiration_date}
{<prefix>:comment_expiration_date}
{<prefix>:edit_date}
{<prefix>:recent_comment_date}
{<prefix>:comment_total}
{<prefix>:channel}
{<prefix>:channel_short_name}
{<prefix>:your_custom_field}

Basic Example

{exp:structure_nav:basic show_depth="4"}
{if root:count == 1}
<ul>
{/if}
  <li{if root:active} class="active"{/if}>
    <a href="{root:page_url}">{root:title}</a>
    {if root:has_children}
    <ul>
      {root:children}
      <li{if child:active} class="active"{/if}>
        <a href="{child:page_url}">{child:title}</a>
        {if child:has_children}
        <ul>
          {child:children}
          <li{if grandchild:active} class="active"{/if}>
            <a href="{grandchild:page_url}">{grandchild:title}</a>
            {if grandchild:has_children}
            <ul>
              {grandchild:children}
              <li{if great_grandchild:active} class="active"{/if}>
                <a href="{great_grandchild:page_url}">{great_grandchild:title}</a>
              </li>
              {/grandchild:children}
            </ul>
            {/if}
          </li>
          {/child:children}
        </ul>
        {/if}
      </li>
      {/root:children}
    </ul>
    {/if}
  </li>
{if root:count == root:total_results}
</ul>
{/if}
{/exp:structure_nav:basic}

Advanced Example

{exp:structure_nav:advanced show_depth="4"}
{if root:count == 1}
<ul>
{/if}
  <li{if root:active} class="active"{/if}>
    <a href="{root:page_url}">{root:title} {root:entry_date format="%Y-%m-%d %H:%i:%s"} ({root:status})</a>
    <div class="root-info">
      <p>{root:your_custom_field}</p>
      <ul>
      {root:your_custom_grid_field}
        <li>{your_col}</li>
      {/root:your_custom_grid_field}
      </ul>
    </div>
    {if root:has_children}
    <ul>
      {root:children}
      <li{if child:active} class="active"{/if}>
        <a href="{child:page_url}">{child:title} ({child:status})</a>
        {if child:has_children}
        <ul>
          {child:children}
          <li{if grandchild:active} class="active"{/if}>
            <a href="{grandchild:page_url}">{grandchild:title} ({grandchild:status})</a>
          </li>
          {/child:children}
        </ul>
        {/if}
      </li>
      {/root:children}
    </ul>
    {/if}
  </li>
{if root:count == root:total_results}
</ul>
{/if}
{/exp:structure_nav:advanced}

Download Structure Nav

EE Support Downloads Add-On Version Release Date
2.6.0+ Download 1.0.6 Aug 23, 2015

Structure Nav Links

This entry was created March 10, 2015, 8:23 am.
This entry was last updated August 23, 2015, 3:40 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

3 Reviews:

Versa Studio 05.21.15

Versa Studio
Rating - {addon_rating_average}

Sanchez is psychic. I have a project using Structure which needed custom-designed nav that contains images. This add-on showed up just in time. I haven’t tested it for hits to the DB, but it works great. Where do I send money?

xynergy_inc 05.12.15

Rating - {addon_rating_average}

Finally!  This is what we’ve been waiting for to be able to use Structure to output Bootstrap compatible menus without the overhead or ‘hidden from nav’ restrictions of Structure Entries. Thank you!!!

Reinos 03.18.15

Rating - {addon_rating_average}

Finally a plugin for the Structure module, where you can modify your menu in an easy way.
(The only thing i like to see, is to get rid of the depth levels eg “child, grandchild etc..”. Like structure entries, you only define a root and sub.)