Custom autonav
Permalink
I would like to be able to break my navigation up into 3 sections but still use autonav. Currently I have just one section that uses autonav the others are just styled lists/links. Please see here... http://duchy.dhdesign-uk.com/
Is this possible is so any clues as to how it might be achieved. Many thanks
David
Is this possible is so any clues as to how it might be achieved. Many thanks
David
Why not create three 'parent' pages for each of the three sections, then put the required children pages under each section. Then in your template you would call an auto-nav to display each sections children? Use the "Display Pages - Beneath a particular page" option when adding the auto-nav.
The solution I suggested was to use one autonav block only and should work as intended regardless where the pages are located.
Your solutions will work and are definitely considered options. My solution may require three instances of the auto-nav block, but it is easier and does not require coding skills or custom templates.
Absolutely right. Not coding or templates. That's easier for most of users.
Thanks for the feedback, being new to Concrete5 I am struggling to visualise how that would actually work. I do want the menu to be common to all pages, I am thinking of using superfish as some pages will have many child products.
Well, you've got your template created right now with one Area for the first menu section, and then it sounds like you've hard-coded the rest in.
My suggestion is to replace the other two sections of hard-coding with two new Areas that you can add the auto-nav block to.
You would also change your Sitemap to something like this:
Home
-The Duchy Store
--Home
--About
--Search
-Duchy Products
--Fencing
--...
-Building and DIY
--Sheet Material
--...
When you add the Auto-nav block to each of those three areas, it allows you to "Display Pages" from beneath a certain page, so you would select Beneath a particular page from the select box and then select each corresponding section page (i.e. The Duchy Store, Duchy Products or Building and DIY)
The auto-nav will then place a list of every page under the particular section within that Area. Repeat for each section.
I'm probably making it more confusing than it needs to be.
- Create three areas in your template under each section heading.
- Create the structure I outlined above in your Sitemap.
- Add an auto-nav block to each of the three areas and set it to pull in pages under the particular page for that area.
My suggestion is to replace the other two sections of hard-coding with two new Areas that you can add the auto-nav block to.
You would also change your Sitemap to something like this:
Home
-The Duchy Store
--Home
--About
--Search
-Duchy Products
--Fencing
--...
-Building and DIY
--Sheet Material
--...
When you add the Auto-nav block to each of those three areas, it allows you to "Display Pages" from beneath a certain page, so you would select Beneath a particular page from the select box and then select each corresponding section page (i.e. The Duchy Store, Duchy Products or Building and DIY)
The auto-nav will then place a list of every page under the particular section within that Area. Repeat for each section.
I'm probably making it more confusing than it needs to be.
- Create three areas in your template under each section heading.
- Create the structure I outlined above in your Sitemap.
- Add an auto-nav block to each of the three areas and set it to pull in pages under the particular page for that area.
That's great, and how I originally thought it might work will give it a go now see if I can get it to work, thanks
That did it! Very simple in the end. One question... when I add pages I have to add the nav each time, is there a way to duplicate a page so I don't need to keep adding the nav blocks?
Check out: Dashboard -> pages and themes -> page types, then defaults for each page type. Whatever the default looks like will be what you see for each new page you add.
1. Create a custom menu, using Sitemap and Page Aliases, and display that with autonav block.
2. Create an attribute, say autonav_group, and use that to determine which group the link should be in. Then use a custom template to display the links the way you want.