AutoNav (hardcoded) - last item DOES NOT open subpage

Permalink
Hi,

I have autonav block hardcoded into header.php template's element:
<div id='nav-main' class='nav nav-main'>
    <?php
   $bt_nav = BlockType::getByHandle('autonav');
   //$bt_nav->controller->displayPages = 'second_level';
   $bt_nav->controller->displayPages = 'current';
   $bt_nav->controller->orderBy = 'display_asc';
   $bt_nav->controller->displaySubPages = 'none';
   $bt_nav->render('templates/header_menu');
    ?>
</div> <!-- End of main navigation -->


Site Map is as follows:

Home
--Category 1
----About
----Register
----Login
--Category 2
----About
----Login

"current" level (displayPages) refers to Pages within category,

Category1, 2... pages don't not contain any content and are not meant to be displayed (I set up ExcludeFromNav, ExcludeFromSearchIndex and ExcludeFromSitemap custom attributes attributes to YES --> however setting those to NO didn't solve the problem described below),

required effect is to have all subpages within category displayed by AutoNav on page within this category, e.g each of three pages within Category1 should display menu as follows:
ABOUT REGISTER LOGIN

and that works, however:

regardless if I used AutoNav block that comes with c5 instalation (5.6.2.1) or tweeked one (http://c5blog.jordanlev.com/blog/2011/12/customizing-the-autonav-template/) the last displayed menu item does not the link to the relevant page, to be very exact - it is output as HTML hyperlink, see code below but link doesn't work:
<div id="nav-main" class="nav nav-main">
<ul class="nav-header">
<li class="nav-selected nav-path-selected first">
<a class="nav-selected nav-path-selected first" target="_self" href="/category1/about/">about</a>
</li>
<li class="">
<a class="" target="_self" href="/category1/register/">register</a>
</li>
<li class="">
<a class="" target="_self" href="/category1/login/">login</a>
</li>
</ul>
<div class="ccm-spacer"> </div>
</div>


It seems like this link is somehow prevented from working - when hovered it doesn't behave as other link (1. there's no underline shown, 2. target url is not shown in browser's status bar),

Adding extra subpage within Category1 makes "login" menu item working properly - and again the last, new item doesn't work.

How can I solve this?

 
keeasti replied on at Permalink Reply
keeasti
Have you tried changing

$bt_nav->controller->displayPages = 'current';

to

$bt_nav->controller->displayPages = 'relevant';

I think this may give you what you are after
WalkingInTheDarkness replied on at Permalink Reply
Hi, thanks for your reply,

but it doesn't solve the the problem: after replacing
$bt_nav->controller->displayPages = 'current';

with
$bt_nav->controller->displayPages = 'relevant';


following items are displayed by AutoNav:

HOME CATEGORY1

and still - second item behaves in the same way as described in my original post
WalkingInTheDarkness replied on at Permalink Reply
CAN YOU PLEASE IGNORE THIS QUESTION

Problem is not related to concrete5 CMS

mentioned page is being designed as responsive and changing browser's width I have noticed that the described problem exists above specified page width only and that leaded me to conclusion that last item doesn't work as it's covered with next <div> that starting from this breakpoint has negative top margin,

I apologise for messing up...
keeasti replied on at Permalink Reply
keeasti
No worries :)