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.
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.
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:
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');
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.
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.
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