submenu doesnot appear
Permalink
in my theme i designed a menu wich has a submenu on it using the code
<div id="menu">
<?php
$bt_nav = BlockType::getByHandle('autonav');
$bt_nav->controller->displayPages = 'top';
$bt_nav->controller->orderBy = 'display_asc';
$bt_nav->controller->displaySubPages = 'none';
$bt_nav->render('view');
?>
</div>
but the sub menue doesnot appear
also in my css i put a properties for the last and the current page which is doesnot work
could u help me solving this?
Thanx.
<div id="menu">
<?php
$bt_nav = BlockType::getByHandle('autonav');
$bt_nav->controller->displayPages = 'top';
$bt_nav->controller->orderBy = 'display_asc';
$bt_nav->controller->displaySubPages = 'none';
$bt_nav->render('view');
?>
</div>
but the sub menue doesnot appear
also in my css i put a properties for the last and the current page which is doesnot work
could u help me solving this?
Thanx.
In your code you have this line
Note the "none" this is telling the autonav controller to display no sub pages!
change it to
and it should work for you..
Here is a better explanation of your options
$bt_nav->controller->displaySubPages = 'none';
Note the "none" this is telling the autonav controller to display no sub pages!
change it to
$bt_nav->controller->displaySubPages = 'all';
and it should work for you..
Here is a better explanation of your options
<?php $bt = BlockType::getByHandle('autonav'); $bt->controller->displayPages = 'top'; // 'top', 'above', 'below', 'second_level', 'third_level', 'custom', 'current' $bt->controller->displayPagesCID = ''; // if display pages is set ‘custom’ $bt->controller->orderBy = 'display_asc'; // 'chrono_desc', 'chrono_asc', 'alpha_asc', 'alpha_desc', 'display_desc','display_asc' $bt->controller->displaySubPages = 'all'; //none', 'all, 'relevant_breadcrumb', 'relevant' $bt->controller->displaySubPageLevels = 'all'; // 'enough', 'enough_plus1', 'all', 'custom' $bt->controller->displaySubPageLevelsNum = ''; // if displaySubPages is set 'custom' $bt->render('view'); // for template 'templates/template_name'; ?>
Hi,
Please change
$bt_nav->controller->displaySubPages = 'none';
to
$bt_nav->controller->displaySubPages = 'all';
and then check.
Thanks
Please change
$bt_nav->controller->displaySubPages = 'none';
to
$bt_nav->controller->displaySubPages = 'all';
and then check.
Thanks
<?php
$bt_main = BlockType::getByHandle('autonav');
//$bt_main->controller->displayPages = 'top';
$bt_main->controller->orderBy = 'display_asc';
$bt_main->controller->displaySubPages = 'all';
$bt_main->controller->displaySubPageLevels = 'custom';
$bt_main->controller->displaySubPageLevelsNum = '2';
$bt_main->render('templates/view');
?>
I think this will work for you.