i have this menu:
<ul class="lavaLamp" id="menu">
<li><a href="./index.xhtml" >Home</a></li>
<li class="current"><a href="#">Company</a>
//..
</ul>
I want this menu be a component, so i don’t have to copy and paste in every .xhtml page.
But i need to specify the class field in the <li> tag, so the plugin ‘LavaLamp‘ can be applied.
E.g: the current page is index.xhtml so it should generate:
<ul class="lavaLamp" id="menu">
<li class="current"><a href="./index.xhtml" >Home</a></li>
<li><a href="#">Company</a>
//..
</ul>
I’m thinking how do this but nothing came out.
Any idea ?
After @meriton talk about EL, i searched about it and found something about EL ternary, so this is my solution: