Adding an additional class to Autonav?

Permalink
Hi, i'm new to Concrete5 and just getting settled in.
So far i'm finding it pretty nice to use, if rather different to what i'm used to.

I have an issue that i'm hoping someone around here might have a good answer to.

I have made a copy of the autonav block and made some small modifications, to make it use the classes i want it to, and to not apply classes to certain parts (as my html/css doesnt need them)

So far it it outputting this:

<ul class="nav">
<li class="active"><a href="/">Home</a></li>
<li><a href="/test/">Test</a>
<ul>
<li><a href="/test/next-level/">Next Level</a></li>
<li><a href="/test/more-testing/">More Testing</a></li>
</ul>
</li>
</ul>

Which works very nicely! However one last thing i need it to be able to do is beyond my skills/understanding at the moment.
WHat i want to do is apply a class to the <a> of any <li> that contains an <ul>! So basically, the first <a> in any item with a drop down. The result (html output wise) i am hoping to achive is:

<ul class="nav">
<li class="active"><a href="/">Home</a></li>
<li><a class="drop" href="/test/">Test</a>
<ul>
<li><a href="/test/next-level/">Next Level</a></li>
<li><a href="/test/more-testing/">More Testing</a></li>
</ul>
</li>
</ul>

As you can see, there is a class named "drop" applied.

Short of using jQuery to apply a class, (which i would rather not do if i can help it) i'm gussing some code modification is required in the view.php file for my autonav block copy.

Does anyone have any idea what i would need to add to make it output that class in the right place?

Cheers,
Dan.

pulsecode
 
pulsecode replied on at Permalink Reply
pulsecode
Clearly i hadn't done quite enough digging on these forums!
Slightly embarrassingly, i'm answering my own question haha!

So, what i was trying to achive is nicely covered in the cleaner version of autonav, the thread on which can be found here:http://www.concrete5.org/community/forums/customizing_c5/new-cleane...

Really great work there, and has tons of little extras that make it really well worth trying out :)