Are CSS drop down nav menus possible in C5??
Permalink
Hi i'm new to C5 so i'll apologies for any naivety now, I've coded a static html site with a drop down nav menu, I've added all my php etc and everything is working nice in c5:) apart from my nav menu:( its a pure css nav so i figured if i added child pages through c5 to the main pages in the nav menu and played around with the levels etc that my drop down would show on rollover! but no matter what i do i just cant seem to get this to happen. I've seen a vid on youtube that says you cant do this in C5 or something to that effect anyway, but the vid is from 2011 and looks like an older version of c5. can anybody point me in the right direction on how i to achieve this as I've been tinkering with this now for dayzzzzzz.... and i just cant get it
cheers i'm going to try an work this out without the use of add-ons. I'm no stranger to php, css or html so i should be able to work something out. this is part or a uni project and i thought it would be cool if the clients would be able to add pages and sub pages as they need to but it looks like i'll have to hard code them into the site. I was just looking for some direction in how to approach the problem, but i think i found it on google after posting this question.
Why dose everything to do with c5 seems to be shrouded in mystery and kept as a closely guarded secret?! :( I chose C5 as my main CMS to learn and master but i'm really starting to regret my choice with the lack of info available unless your willing to hand over masses amounts of cash! is this really open source?! I'm not convinced.
Why dose everything to do with c5 seems to be shrouded in mystery and kept as a closely guarded secret?! :( I chose C5 as my main CMS to learn and master but i'm really starting to regret my choice with the lack of info available unless your willing to hand over masses amounts of cash! is this really open source?! I'm not convinced.
C5 has a very good built-in nav system. Why re-invent the wheel? I've only been building with C5 for about 6 months so I'm just a pup myself but I think you'll find lots of help from the community. C5 is very powerful but you have to be willing to use the tools that are available. If you want to 'roll your own' then any CMS will be frustrating for you.
I would also suggest that you download the add-on that Ekko suggested and have a look at the css and js files to see how they do it. You don't have to install the add-on, just learn from it. That's how I learn best anyways so that's what I've been doing since I started a few months back. All add-ons you download, free or paid, have the source code for you to look at and learn from.
What do you mean when you say that you'll have to hard-code the new pages into the site? C5 is very good at allowing users to add pages and sub-pages. Just open the parent page for editing and click the 'Add a Sub-Page' button. Am I missing something in your question?
I would also suggest that you download the add-on that Ekko suggested and have a look at the css and js files to see how they do it. You don't have to install the add-on, just learn from it. That's how I learn best anyways so that's what I've been doing since I started a few months back. All add-ons you download, free or paid, have the source code for you to look at and learn from.
What do you mean when you say that you'll have to hard-code the new pages into the site? C5 is very good at allowing users to add pages and sub-pages. Just open the parent page for editing and click the 'Add a Sub-Page' button. Am I missing something in your question?
Take a look at the Autonav block. Combine that with jordanlev's clean block templates (https://github.com/jordanlev/c5_clean_block_templates -- soon to be part of the core), and it should be very straight-forward to setup your existing nav styles in C5 while maintaining the site structure.
Hi sorry for the late reply i've been away for a while. both the comments have been very helpful. I've found an alternative solution to what i originally wanted to achieve with my nav menu. I didn't want the people i'm making the site for to be able to change the main nav menu but i wanted them to be able to add sub pages to it.
so for example... Home About History etc...
History
-subpage history 1
-subpage history 2
-subpage history 3
etc.
I originally wanted the sub pages to be hidden until you roll over the history but what i'm going to do now is embed the main nav menu so it cant be edited by the user, minimising the risk of them breaking something and i'm going to go with a side bar nav that they can add new Sub pages to instead. I've not actually done it yet so i'll see how things go! thanks for all the help guys i've saved your link suggestions for future reference ;)
so for example... Home About History etc...
History
-subpage history 1
-subpage history 2
-subpage history 3
etc.
I originally wanted the sub pages to be hidden until you roll over the history but what i'm going to do now is embed the main nav menu so it cant be edited by the user, minimising the risk of them breaking something and i'm going to go with a side bar nav that they can add new Sub pages to instead. I've not actually done it yet so i'll see how things go! thanks for all the help guys i've saved your link suggestions for future reference ;)
Before you get too far down the road, you might want to watch this video about the new permissions model that's new in version 5.6.
http://www.concrete5.org/about/blog/concrete5-sightings/check-out-a...
The permissions model that exists in 5.5 can already control who is allowed to add things to your site but this new permissions model in 5.6 really steps it up a notch and allows developers to lock down the site so the client can't break things. I'd advise you to take the time to learn what C5 already offers under the hood (for free) before trying to build something that works around the C5 functionality. As C5 matures, you will be really glad you built pages around the core functionality because your custom solutions might be hard to maintain if your site breaks during an upgrade. It's also harder to get free advice on these forums if you're not using built-in C5 functions.
http://www.concrete5.org/about/blog/concrete5-sightings/check-out-a...
The permissions model that exists in 5.5 can already control who is allowed to add things to your site but this new permissions model in 5.6 really steps it up a notch and allows developers to lock down the site so the client can't break things. I'd advise you to take the time to learn what C5 already offers under the hood (for free) before trying to build something that works around the C5 functionality. As C5 matures, you will be really glad you built pages around the core functionality because your custom solutions might be hard to maintain if your site breaks during an upgrade. It's also harder to get free advice on these forums if you're not using built-in C5 functions.
I totally hear what your saying that's not really the reason for embedding the nav menu. i found out about the embed nav menu from a comment in the nav.php file in the elements folder. (/* You can also embed this so that it isn't editable by using this code:http://pastie.org/2282530 */) the nav menu is not likely to change so i think it should be fine to embed it. and as far as adding a side bar nav instead of the drop down nav will make things so much more easier for me as i'm already late on this project and this option looks better on the design comps too, and it makes it easier to navigate around the site also!
Taking a look under the hood will help you get to where your going.