Adding a Unique ID to the <li> element in a Nav Menu

Questions related to the configuration of Joomla, Templates, and Security related questions/issues
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu Oct 24, 2013 11:49 pm
Hi

I am currently using simplicity on j3.1.5, but I assume this applies to pretty much most of the menus.

I am trying to move the Unique ID on what are the <a> elements of a navigation to the parent <li>.

Can you please advise how I should go about this.

Here's a sample bit of code I've lifted from Simplicty:

Code: Select all
<div id="gkMainMenu">
                <nav class="gkMenu" id="gkExtraMenu">
<ul class="gkmenu level0"><li class="first active"><a title="Home" id="menu640" class=" first active" href="#" onmouseover="">Home</a></li></ul>
</nav>   
             </div>


I want it to change the <li> from above to the below:

Code: Select all
<li class="first active"  id="menu640"><a title="Home" class=" first active" href="#" onmouseover="">Home</a></li>


I simply need to be able to specifically style one menu item in a specific way and it happens to be 4th in the list. But because of the parameters of the <li> I need to get to the <li> element specifically.

Hopefully that makes sense.


Thank you.
User avatar
Fresh Boarder

GK User
Fri Oct 25, 2013 6:25 am
Hi,
maybe my tip (about icons in menu) will help you solve your problem: http://www.gavick.com/documentation/joo ... enu-items/

but using simple CSS you can change HTML code.

So, you have to customize a menu code - check also this file: gk_simplicity\js\gk.menu.js

and who knows maybe also plg_gkextmenu plugin code.

p.s.
But we don't help in core template customizations, which are not based on css only.
User avatar
Platinum Boarder


cron