Is there an alternate way to output the header nav
Permalink
I was wondering if there was a way to output the header nav without using <?php $a = new Area('Header Nav'); $a->display($c); ?>
Something that makes the nav show permanently while calling the core to get the links for the other pages.
Something that makes the nav show permanently while calling the core to get the links for the other pages.
I think he's asking if there is a way to hard code the Loader Element that puts the header nav on the page instead of putting it into a block. Then there's no editable area on the navigation for someone to mess with, but still pulls the links from the sitemap.
So... Like it does with the header and footer, right?
Yep, still a lot of code.
I searched the forum a bit and got the code. I was gonna paste just a link but that doesn't feel right, so I'm gonna explain things a bit. ;)
Here is the easiest solution I found:
You should replace 'view' with 'templates/YOUR_TEMPLATE_NAME' (Referencing it, obviously) if you wanna do that with a custom template.
For the most exquisite solution, it was posted referring to a Login block and is way more complex. I was changing it to an autonav script but it gets a bit complex and I am lazy right now. Anyway, it lets you add css files and js files on the <head> instead of just referencing a template, so I guess it can come in handy in some situations. If you want to see it, just follow the link where I found the answers:
http://www.concrete5.org/community/forums/customizing_c5/how-to-imp...
I am wishing to work with these solutions later, I liked the idea, so if you need any help, just ask.
Yep, still a lot of code.
I searched the forum a bit and got the code. I was gonna paste just a link but that doesn't feel right, so I'm gonna explain things a bit. ;)
Here is the easiest solution I found:
$bt_main = BlockType::getByHandle('autonav'); $bt_main->controller->displayPages = 'current'; $bt_main->controller->orderBy = 'display_asc'; $bt_main->controller->displaySubPages = 'none'; $bt_main->render('view');
You should replace 'view' with 'templates/YOUR_TEMPLATE_NAME' (Referencing it, obviously) if you wanna do that with a custom template.
For the most exquisite solution, it was posted referring to a Login block and is way more complex. I was changing it to an autonav script but it gets a bit complex and I am lazy right now. Anyway, it lets you add css files and js files on the <head> instead of just referencing a template, so I guess it can come in handy in some situations. If you want to see it, just follow the link where I found the answers:
http://www.concrete5.org/community/forums/customizing_c5/how-to-imp...
I am wishing to work with these solutions later, I liked the idea, so if you need any help, just ask.
If that's it, I would just keep the Theme that way and add it to the Default of each page. Not too many page types anyways...
Now if you want it to be fixed on the theme, I wouldn't advise that. C5 pulls everything from the sitemap for you, maybe there is a specific way, but I bet you will have to rewrite a lot of code. Code which already comes with C5..