Embedded autonav does not refresh

Permalink
Hi there,

I have a template-embedded autonav a-la:
$bt_main = BlockType::getByHandle('autonav');
    $bt_main->controller->displayPages = 'top';
    $bt_main->controller->orderBy = 'display_asc';                    
    $bt_main->controller->displaySubPages = 'none';                    
    $bt_main->controller->displaySubPageLevels = 'enough_plus1';                    
      $bt_main->render('view');


However, as I have built the site the older pages do not show newer top-level pages in the autonav with this code. It is as though the older pages have stored the menu in the cache and wasn't reprocessing the code, which would be puzzling. I disabled caching on the site but this did not help.

Any ideas?

Thanks,
Dan

dvodvo
 
Mnkras replied on at Permalink Best Answer Reply
Mnkras
why do you have
$bt_main->controller->displaySubPageLevels = 'enough_plus1';


also, clear your browser's cache, and make sure exclude from nav is not checked
dvodvo replied on at Permalink Reply
dvodvo
Yep, that did it. Thanks (sheepishly!). I had that line because I was silly and didn't remove it from another implementation of the same code that had subnavs.

Best,
Dan