How to hard-code Auto-Nav in view.php? Simple Blog posts menus keep disappearing.

Permalink
Every new blog post I make means I have to add navigation back. As a solution, I tried to do what I did for my other custom page templates by creating a page type called "view" and then clicking "default" and then clicking the navigation area to "Set Up On child Pages" but it said there were no pages using this template... yet, I know that Simple Blog uses view.php for the blog posts because before I dropped view.php in there, it wasn't working at all.

 
zoinks replied on at Permalink Reply
Oh, hmmm. I'm guess it would make sense to stick my navigation in header and footer php file includes? I've never attempted this with C5 before, but that's what I used to do with my super-minimal PHP knowledge... would Auto-Nav work like this?

I have no idea how to hard-code it, though.

If you look at my site, I have 3 Auto-Navs; 2 are just top level default, but the one on the bottom right is beneath a specific Parent page:

http://www.amygerber.com
zoinks replied on at Permalink Reply
Anyone? I'm thinking maybe try to stick the top portion of my design in header_required.php but there's actually quite a lot of code in header_required and I don't really know what it all does. Trying to hard-code the top navigation in there might be quite a lengthy trial and error period.
RadiantWeb replied on at Permalink Best Answer Reply
RadiantWeb
yes, hard code your nav into your header. if you search this site there are several tutorials/posts on how to do this.

but something like this should work:
$bt_main =BlockType::getByHandle('autonav');
$bt_main->controller->displayPages = 'top';
$bt_main->controller->orderBy ='display_asc';
$bt_main->controller->displaySubPages ='none';
$bt_main->render('templates/header_menu');
zoinks replied on at Permalink Reply
Thanks!

I searched before I posted, but I didn't really see anything. I generally always search before I post something because it's always easier to just find the answer if it's already out there.