Persist autonav template

Permalink 1 user found helpful
How do I persist an autonav template so that it is used site wide as opposed to one instance of a page?

alanski
 
johndorsay replied on at Permalink Best Answer Reply
johndorsay
Well, you could use a global scrapbook and update the defaults for each page type or if you do not want the client to be able to mess with the block yo ucan hard code it into the template file

Replace this:
<?php 
         $as = new Area('Sidebar');
         $as->display($c);
         ?>

with something like this

<?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/header_menu_with_drop');
           ?>
alanski replied on at Permalink Reply
alanski
That sounds good.
Cheers
okhayat replied on at Permalink Reply
okhayat
More detailed discussion, that really helped me, here:
http://www.concrete5.org/index.php?cID=11798...