Want active menu item css styles for your K2 module content items?Here is how;Open default.php (mod_k2_content/tmpl/Default/default.php)Add this just afetr line 13 :<?php //check url for K2 and get id to pass to loop to create active css class (JRequest::getVar('option') == 'com_k2') ? $k2id = JRequest::getVar('id') : $k2id ="";?>On line 22 change this: <li class="<?php echo ($key%2) ? "odd" : "even"; ?>"> to this: <li id="" class="<?php echo ($key%2) ? "odd" : "even"; ?> <?php echo ($k2id == $item->id.':'.$item->alias) ? "active" : "" ; ?>">Note we are just adding a space to the class and adding another class. You can then adjust your style sheets like so:.k2ItemsBlock ul li.active a {font-weight:bold;color:red}Now you have active item highlighting!
16 years 7 months ago #81891