Autonav Drop Down

Permalink
Hey guys, I am finding that when I use autonav blocks within a template as opposed to inserting a autonav block via editable new area, that the layout's differ.

When you insert the autonav block via adding to an area, it is formatted correctly:

<ul>
<li><a href="">Parent Link</a>
<ul>
<li><a href="">Child Link</a></li>
</ul>
</li>
</ul>

But if you insert the autonav block within a template. It gives you this
<ul>
<li><a href="">Parent Link</a></li>
<li><a href="">Child Link</a></li>
</ul>


I need the format to be first example as i need a drop down.

The code I am using to insert the block is:

$bt_menu = BlockType::getByHandle('autonav');
$bt_menu->controller->displayPages = 'top';
$bt_menu->controller->orderBy = 'display_asc';
$bt_menu->controller->displayPagesCID = '0';
$bt_menu->controller->displaySubPages = 'all';
$bt_menu->controller->displaySubPageLevels = 'custom';
$bt_menu->controller->displaySubPageLevelsNum = '1';
$bt_menu->render('templates/header_menu');


Am i doing something wrong?

Thanks in advance!

 
kino replied on at Permalink Reply
kino
$bt_menu->render('templates/header_menu');

this meen using 'concrete/blocks/autonav/templates/header_menu.php'

to

$bt_menu->render();

this meen using 'concrete/blocks/autonav/view.php'
roa123 replied on at Permalink Reply
Thanks for the quick reply Kino. I duplicated the view page as i was making cosmetic changes to it, such as adding classes, but essentially it is still the same as the view.php file and it still didn't work.
kino replied on at Permalink Reply
kino
sorry.

change to
$bt_menu->render('view');