css navbar

Permalink
I am working on my first concrete5 theme. I have little to no php but I have been able to get most of it working. Now I had been working from a html and css template I made, I can't figure out how to add and remove links from the nav bar through the dashboard and my css styles still be used. Can anyone help a noob?

 
VidalThemes replied on at Permalink Reply
VidalThemes
Hi There,

Assuming you are using the Autonav block, you can remove a page from the main nav by excluding it using the page properties.

Navigate to the page you want to exclude, put it in edit mode, click the properties box and go to the custom attributes section, you should see a check box for exclude from nav, check it, save and the page will be gone from your main nav and none of your CSS will be altered.

Is that what you are looking for, or am I misunderstanding?
subdeli replied on at Permalink Reply
What I meant was I am in the middle of codeing my theme and I have a css styled nav bar. I need to keep the styles and still use autonav or nav
VidalThemes replied on at Permalink Reply
VidalThemes
Ah, I see, personally I would set up an autonav on my site and use firebug or similar to grab the class/Id names then just add them to your existing stylesheet in place of the classes or id's you already have, can't think of a way you could do what you want solely through the dashboard.
jordanlev replied on at Permalink Reply
jordanlev
I just created a custom template for the autonav block that is infinitely easier to customize than the built-in template:
https://raw.github.com/jordanlev/c5_clean_block_templates/master/aut...

Create a new directory on your site at YOURSITE/blocks/autonav/, save the page I linked to as "view.php", and put it into that new directory you created. If you scroll down to the bottom of that file you'll see where you can modify its HTML and CSS to suit the needs of your stylesheet. You will of course need to add an autonav block to your theme to make it work, which you can either add to an area on your pages or use the Page Defaults to include it on every page, or you could paste this code into your theme directly to ensure it appears on every page and that the user is unable to remove it:
<?php
$nav = BlockType::getByHandle('autonav');
$nav->controller->orderBy = 'display_asc';
$nav->controller->displayPages = 'top';
$nav->controller->displaySubPages = 'all';
$nav->controller->displaySubPageLevels = 'custom';
$nav->controller->displaySubPageLevelsNum = 1;
$nav->render('view');
?>

(If you want more than a 1-level dropdown, change the number 1 to 2 in the code above).

Please let me know if you have trouble working with this file -- I just made it and while it makes a lot of sense to me, I'd be interested to hear if you think it could be made even easier somehow.

Hope that helps!

-Jordan
ORBranding replied on at Permalink Reply
I know this will sounds very basic but. . .
How do I create a New folder?
Then how do I get it onto the site.
I am trying to adjust my Navbar
and I want it to have all my pages
on all of the pages.
jordanlev replied on at Permalink Reply
jordanlev
You need to edit the actual code files on your server, which you can do with either an FTP program or through your web host's "CPanel" or "Control Panel" (not the Concrete5 login).