No page/link for Parent of subpages in nav

Hello,

I am using the following code to create my navigation based on the pages and subpages:

{{ nav:exists from="/" max_depth="4" folders_only="true" }}
{{ nav from="/" max_depth="10" folders_only="true" }}
    {{ if first }}{{ parent }}<li><a href="#">{{ title }}</a></li>{{ /parent }}{{ endif }}
    <li {{ if is_current || is_parent }} class="{{ if depth == 1 }}active-parent{{ endif }}" {{ endif }}>
        <a {{ if is_current || is_parent }} class="{{ if depth == 1 }}active{{ elseif depth > 1 }}active-child{{ endif }}" {{ endif }} href="{{ url }}">{{ title }}</a>
        {{ if children }}
            <ol>
                {{ *recursive children* }}
            </ol>
        {{ endif }}
    </li>
{{ /nav }}
{{ /nav:exists }}

One item in the navigation has 3 subpages as children, but I do not want there to be a HTML page for the parent. Only for the subpages.

Is there a way I can display the parent title WITHOUT it having a link? Then, when it is clicked or hovered on, no matter what page you are currently on, the list of subpage children will drop down?

Here is an example from your showcase which has achieved this: https://www.dropscan.de/tour

Thanks and please feel free to comment on this for any clarification!

Answered by Jason Varga!
>>>>>>> Answered <<<<<<<
7 Replies
2 Followers