Hide page from main nav but show in sitemap autonav?
Permalink 1 user found helpful
Hi all
I thought autonav was broken until I realised it wasn't showing things because the 'Hide from nav' box was clicked. Trouble is, I need to hide a News page from the main homepage navigation, but I want it to appear in the autonav block which I've inserted in my sitemap page.
Any thoughts on how to get round this?
I thought autonav was broken until I realised it wasn't showing things because the 'Hide from nav' box was clicked. Trouble is, I need to hide a News page from the main homepage navigation, but I want it to appear in the autonav block which I've inserted in my sitemap page.
Any thoughts on how to get round this?
Anyone have any thoughts on this? It must have occurred on someone else's site.
create a custom template and check for a custom attribute there.. This way the autonav block would produce a complete list of all pages but depending on the template (which you can select per block instance) you'd only see certain pages.
Do you mean replace the default Header Nav area with an autonav block, then set that to display only pages with a specific attribute, which I define and apply to the pages I want to be displayed in the navigation?
Can you explain in baby steps what you're suggesting? :)
If you use a page list instead of an autonav, they operate on different properties. Or, as Remo suggested, you can create your own template.
When you click on a block you can choose a custom template. These are different "view" for the same block. If you create your own, you will have free access to change the behavior of the block so that it ignores the hide property, or perhaps respects your own. You can copy view.php from the autonav block and rename it as a template.
If you create your own template, don't put it in the concrete directory, but on the root level. The same directory structure is present in both, but the root directories will overwrite the core, and will not be overwritten when upgrading to a new version of Concrete. You can see the structure if you look at the autonav block and its templates folder. You can replicate the same at /blocks/autonav/templates with your own template.
Does this help a little? The autonav block already comes with some custom templates, so looking around at the source files should help you see how this works
If you create a file under /blocks/autonav/templates
When you click on a block you can choose a custom template. These are different "view" for the same block. If you create your own, you will have free access to change the behavior of the block so that it ignores the hide property, or perhaps respects your own. You can copy view.php from the autonav block and rename it as a template.
If you create your own template, don't put it in the concrete directory, but on the root level. The same directory structure is present in both, but the root directories will overwrite the core, and will not be overwritten when upgrading to a new version of Concrete. You can see the structure if you look at the autonav block and its templates folder. You can replicate the same at /blocks/autonav/templates with your own template.
Does this help a little? The autonav block already comes with some custom templates, so looking around at the source files should help you see how this works
If you create a file under /blocks/autonav/templates
Thanks, that worked a treat! I'm getting to grips with the idea of templates now, and I can really see their power.
Thanks :)
Thanks :)
Thanks for the explanation