0

I have a website that needs to have a step beyond Terinary navigation.

I do not know how to go about making this possible... My current code...(Which would work in Expression Engine) is the following...

<ul id="nav" class="nav navbar-nav">
    <li><a href="/">Home</a></li>
    {{ nav from="/" max_depth="3" }}
    <li{{ if children }} class="dropdown"{{ /if }}>
       <a href="{{ if assets:file }}{{ assets:file }}{{ path }}{{ /assets:file }}{{ else }}{{ url }}{{ /if }}">{{ title }}</a>
        {{ if children }}
        <ul class="dropdown-menu">
            {{ children }}
            <li{{ if grand-children }} class="dropdown-submenu"{{ /if }}>
                <a href="{{ if assets:file }}{{ assets:file }}{{ path }}{{ /assets:file }}{{ else }}{{ url }}{{ /if }}">{{ title }}</a>
                {{ if grand-children }}
                <ul class="dropdown-menu">
                    {{ grand-children }}
                    <li{{ if great-grand-children }} class="dropdown-submenu"{{ /if }}>
                        <a href="{{ if assets:file }}{{ assets:file }}{{ path }}{{ /assets:file }}{{ else }}{{ url }}{{ /if }}">{{ title }}</a>
                        {{ if great-grand-children }}
                        <ul class="dropdown-menu">
                            {{ great-grand-children }}
                            <li>
                                <a href="{{ if assets:file }}{{ assets:file }}{{ path }}{{ /assets:file }}{{ else }}{{ url }}{{ /if }}">{{ title }}</a>
                            </li>
                            {{ /great-grand-children }}
                        </ul>
                        {{ /if }}
                    </li>
                    {{ /grand-children }}
                </ul>
                {{ /if }}
            </li>
            {{ /children }}
        </ul>
        {{ /if }}
    </li>
    {{ /nav }}
</ul>

Any help would be much appreciated.

Thanks.

EDIT

I was able to figure out the navigation level issue.... However I still need help with the file instead of url replacement if possible. Below is the solution for my multi-level issue.

I seemed to have figured out a solution.....Which kinda annoys me now...

<ul id="nav" class="nav navbar-nav">
    {{ nav from="/" max_depth="4" }}
    <li{{ if children }} class="dropdown"{{ /if }}>
        <a href="{{ url }}">{{ title }}</a>
        {{ if children }}
        <ul class="dropdown-menu">
            {{ if children }}
                {{ *recursive children* }}
            {{ /if }}
        </ul>
        {{ /if }}
    </li>
    {{ /nav }}
</ul>

And instead of having .dropdown-submenu I changed the CSS to .dropdown .dropdown in any places where it was applicable.

I still need assistance with the File instead of link location replacement if possible however.

Korey
  • 54
  • 7

1 Answers1

0

<a href="{{ file | url or url }}">{{ title }}</a>

Buddy
  • 10,874
  • 5
  • 41
  • 58
Jack McDade
  • 689
  • 7
  • 14