adding classes in auto nav

Permalink
Dear folks,

I^m done, since a couple of weeks im trying to implement the very nice vertical slider from stu nichols

http://www.stunicholls.com/menu/jquery-concertina-6.html...

I minimized his code as far as possible to make it "look like" but the classes he uses give the rest.

Is there any way to assign a class to elements of the listing or am I breaking my head on a not existing wall?

Thanks for your input and a nice weekend.

 
ScottC replied on at Permalink Reply
ScottC
check out concrete/blocks/autonav/view.php, the 5th line down:
echo("<ul class=\"nav\">");


That is setting the navigation's css class, which is what I believe you are wanting to change. You can see li class as well further down for active collection/page, so you can change that to whatever stu deemed worthy.
dancobb replied on at Permalink Reply
dancobb
I had to change the menu templates to add spans for one of my projects. You shouldn't modify the concrete/blocks/autonav/view.php directly because those changes will get wiped out when you upgrade. Instead you want to use Custom Templates.

To do this follow these steps:
1. Copy the file concrete/blocks/autonav/view.php or concrete/blocks/autonav/templates/header_menu.php if this was the main nav. (header_menu.php is selected by default on the main nav)

2. Once you have a copy of the file on your desktop or whatnot make the changes that are needed. (See Scott's post)

3. Once the changes are made upload the file to /blocks/autonav/templates/. Name the file something like Custom_Menu.php. You will need to create the autonav and templates directories. Note: This is not in concrete/blocks but the blocks folder in Concrete's root directory.

4. Once it's uploaded go to the page with the autonav on it and enter edit mode.

5. Click the autonav block and select the Set Custom Template option on the menu.

6. Pick the template you just created from the dropdown it will be named Custom Menu or whatever you named it.

7. Click update.

That should be it. Now when you upgrade it wont be overwritten.
ScottC replied on at Permalink Reply
ScottC
If this is a 1 off site you can just overwrite the default view outside of the directory in the file structure outline above. This is nice when you don't want to constantly set a different template for additional pagetypes and things like that. Custom template is nice if you are going to change them or switch different themes on pages, otherwise for me I just overwrite the default view. Again your choice.

edit: Area's can set a default template which is kind of cool as well, have to play around with that.