adding a custom attribute to a custom template to use with autonav

Permalink
Hi,

I have a site with the autonav menu at the top displaying certain pages, but others i have 'exclude from nav' checked.

I also have an accordion menu running from an autonav but i want to create a custom attribute which will cause this to display only certain pages on my site, but overwrite the exclude from nav so in my top menu i could have home, about, contact and in my accordion i could have store, blog, contact

anyone got any ideas? any advice would be hugely appreciated!

thanks for looking :)

 
obaluba replied on at Permalink Reply
Anyone got any ideas on this? Thanks
codingpenguins replied on at Permalink Reply
I believe you could create a custom block template for the nav that you could use this custom attribute and not use the "exclude from nav".

http://www.concrete5.org/documentation/how-tos/designers/custom-blo...

So open the autonav template (concrete/blocks/autonav/templates/header_menu) and you will see:
line 12
if (!$_c->getCollectionAttributeValue('exclude_nav')) {


Just remove the if with your own attribute. Just follow the steps towards the end of the link and you should be fine.
codingpenguins replied on at Permalink Reply
Not saying to make changes to the header_menu.php file but instead copying it over as the link above points out. Just clearing this up.
obaluba replied on at Permalink Reply
great, thanks i will give this a try!
jordanlev replied on at Permalink Reply
jordanlev
Do you need to accordion menu to automatically show pages from the sitemap, or do you want to "manually" choose the pages in it? I've recently made a free addon that lets you manually choose a navigation menu (and the template is *very* easy to style):
http://www.concrete5.org/marketplace/addons/manual-nav...

If, on the other hand, you still need the "automatic" functionality of the autonav menu, then I agree with the approach that @codingpenguins refers to.