Auto Nav

Permalink 1 user found helpful
Goood Afternoon every 1.

This is a question about the Auto Nav, i understand and get the design and its easy to use and update.

How ever i have designed a site with 2 nav bars to 2 sets of pages! Long story but thats the way he wanted it 1 clcik to every page.

Now i have done this using the the auto nav with adding the top level pages to the top nav ie home contact etc.

And for the second nav bar i have put all the pages under a Nav page witch is set to hide from autonav. So this all works and the site is up and running fine. The 2 nav bars are basicly seperated out.

How ever now the site is up the nav page still appears in the URLwww.www.blblbl/index.php/nav/cv...

And after i have turned on pretty urls

http://www.blblalala/nav/cv

Is there a way to stop the nav appearing in the url? This is only to make it look tidy and it works the way it is. This is just a case of me wanting it to look nice and simple.

Thanks for your help
Carl

carl101lee
 
Mnkras replied on at Permalink Reply
Mnkras
that is odd I have never seen that before, can you show us the actual site?
carl101lee replied on at Permalink Reply
carl101lee
Ya no problem i know why it is showing it becasue its acting like a folder does on standerd htl sites


http://www.cochrane.org.uk

Regards
Carl Lee
Mnkras replied on at Permalink Reply
Mnkras
yea works fine for me, (leave a review for the jshare addon if you havn't already)
carl101lee replied on at Permalink Reply
carl101lee
Hi there

Ya the site is up and runnig thats not the problem, maybe i didnt word it correct. It sthe way i set-up the auto nav so that i have a sub page NAV with all the pages for the second nav bar so as to seperate them out.

The problem isnt that it doesnt work. In fact there is no realy problem just a question as to how to if it is possible to run 2 auto navs on the top level with differnt pages so i guess an include option.
I have been having a go using the custom attributes options.

But all i actualy want is to remoive the NAV fomr the URL:

so form thishttp://www.cochrane.org.uk/nav/archive/...

to thishttp://www.cochrane.org.uk/archive/...

Regards
Carl Lee

Ps i shall do a review now
zonathen replied on at Permalink Reply
carl101lee, did you find a solution for this? I was wondering myself how to hide a hidden parent page from the url (path) to the child page.

Or maybe there is some other way of making two different auto navs than putting the pages under a placeholder hidden page and setting the menu to under the child pages of that placeholder page.

Has anybody else tried to do two seperate page autonavs? If so what is the best practice? And is it possible to hide a hidden page parent from a child page's url if not?

Thanks so much!
jordanlev replied on at Permalink Best Answer Reply
jordanlev
I've created a free addon called "Manual Nav" (http://www.concrete5.org/marketplace/addons/manual-nav/... ) that lets you manually choose which pages should be in a nav menu. It is for designers because it doesn't come with any styling -- you need to use your own CSS to style it.
There are other nav menus available on the marketplace that do similar things but include default styling as well (but they cost money, which might be worth it if you don't have your own CSS design already for the secondary nav menu):
http://www.concrete5.org/marketplace/addons/quick-links/...
http://www.concrete5.org/marketplace/addons/clevyr-nav/...
http://www.concrete5.org/marketplace/addons/diy-navigation/...
zonathen replied on at Permalink Reply
Thanks jordanlev, your plugin looks useful!

My issue is I would like to code this secondary menu in my theme (rather than using edit mode to add it even as a default for the page type) and I would also like it to be automatically populated based on a tree of pages like the auto nav does for top level, second level etc.

The only way I have figured out to have two completely separate autonavs show up is to set it to show only children of a page that is hidden. Then it will show all the children appropriately. The only problem with this approach is all the pages that are children have the placeholder hidden parent in their path (url) like site.com/hidden-nav/mypage.

I realize I could modify the path that is showing in the nav through a custom block and use htaccess rewrites and so on but I would rather have the child page just use a different url so everything else in the system thinks the page's url doesn't have the hidden parent in it.

Maybe I'm going about this completely wrong do you have any suggestions given my exact scenario of two completely separate auto navs that contain pages with paths that don't include any extraneous folders in the url and is coded into the theme, not as a edit mode block.

Thanks!
jordanlev replied on at Permalink Reply
jordanlev
What you might want to do is create a new page attribute that is the "checkbox" type and is called "Include In Secondary Nav" (or something like that). Then you can create a custom template for the autonav block to filter out pages that don't have that attribute set.
zonathen replied on at Permalink Reply
Ah okay well that still requires the user having to set a custom attribute, I was looking for a way to avoid that and just have it based on its location in the tree. Tradeoff between a user remembering a custom attribute or having a hidden folder name in the path... Okay guess there is no other automated way from my research. Thanks for confirming.
jordanlev replied on at Permalink Reply
jordanlev
Yeah, I don't think what you want is physically possible -- you're basically saying that you want the secondary nav menu to show only certain pages but you don't want to have to tell the nav menu what those certain pages are.
Creating a secondary nav tree for this purpose is basically the same as creating a custom attribute -- your users will still have to remember to put the page in the nav tree like that. But if that's how you want to roll, I think you could maybe use the "Page Redirect" attribute (http://www.concrete5.org/marketplace/addons/page-redirect/... ) on those pages so they appear in the menu but when someone gets to them they redirect to the real page you want. Still need to set an attribute of course...
zonathen replied on at Permalink Reply
Yeah the root of the problem here is the default url for C5 pages require the hard coded path of their parent in them. I've worked with a lot of CMS's and used this same trick to get a separate auto-nav where you put it under a hidden item but they don't have the parent/child relationship enforced in the page url so you don't run into this. Redirects are hacky and have seo implications and would rather avoid that route.

If there was a way to have the default path to a page be anything you want instead of enforcing the parent tree in the url then this would work fine. I'm fairly new to C5 so I'm learning about its restrictions as I go. Not the end of the world, in this case I'll opt for the attribute route to get prettier urls but that adds extra work for me (custom block) whereas it should be something that could be completely configured through the UI. I think it's easier for a client to remember to put pages under a left nav tree than adding a custom attribute but whateva.

Gracias Amigo, you helped confirm my newbie assumptions. Loving C5 otherwise don't get me wrong :)