Forum

Thread tagged as: Question

navigation menu not working in perch runway.

I am using this code :-

  1. page does not navigate to another page.

<perch:before> <ul class="nav navbar-nav"> </perch:before> <li class="dropdown" <perch:if exists="current_page"> class="active"</perch:if> <perch:if exists="ancestor_page"> class="ancestor"</perch:if>

<a href="<perch:pages id="pagePath" />" class="dropdown-toggle" data-toggle="dropdown"> <perch:pages id="pageNavText" /> </a> <ul class="dropdown-menu" role="menu"> <li

<perch:if exists="current_page"> class="active"</perch:if>
<perch:if exists="ancestor_page"> class="ancestor"</perch:if>
>
<perch:pages id="subitems" encode="false" />
</li>

</ul> </li> <perch:after> </ul> </perch:after>

Damian McCracken

Damian McCracken 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

What actually happens?

If you view source is the output what you expect?

Actually...from one page to another page in the navigation is not working.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What does that mean in HTML terms?

1) Navigation is not working while using code as below :-

<perch:before> <ul class="nav navbar-nav"> </perch:before> <li class="dropdown" <perch:if exists="current_page"> class="active"</perch:if> <perch:if exists="ancestor_page"> class="ancestor"</perch:if>

<a href="<perch:pages id="pagePath" />" class="dropdown-toggle" data-toggle="dropdown"> <perch:pages id="pageNavText" /> </a> <ul class="dropdown-menu" role="menu"> <li

<perch:if exists="current_page"> class="active"</perch:if>
<perch:if exists="ancestor_page"> class="ancestor"</perch:if>
>
<perch:pages id="subitems" encode="false" />
</li>

</ul> </li> <perch:after> </ul> </perch:after>

2) If i set value of data-toggle property as empty, navigation starts working but while checking page as responsive, submenus are not shown. What i'm missing please suggest?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

We don't know what you mean by "not working".

We can't navigate to any page if we use class="dropdown-toggle" data-toggle="dropdown" property.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

But what actually happens? Are you getting an error? If so, what is it?