Active class for first level <li> in mod_cpmenu

  • pmarty
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #1362 by pmarty
Hello,

When enbaling "show field name and field name linkable", it seems that the first level of li doesn't display .active class in the mod_cpmenu.

I need to specify css for that level, please could you tell me how to fix this little problem?

Thanks
Philippe

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #1365 by andrea_4g
Replied by andrea_4g on topic Active class for first level <li> in mod_cpmenu
I'm not able to properly answer your question until the end of this week. It will be my priority soon thereafter.

Please Log in or Create an account to join the conversation.

  • pmarty
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago - 10 years 9 months ago #1370 by pmarty
Thanks :)
Last edit: 10 years 9 months ago by pmarty.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #1376 by andrea_4g
Replied by andrea_4g on topic Active class for first level <li> in mod_cpmenu
I confirm that the parent item is not given the active class.

It can be done with a tiny modification to file modules/mod_cpmenu/mod_cpmenu.php
Add after line 219:
Code:
if(empty($tagGroup)){ $tagGroup = substr($tagName, 0, strpos($tagName, ':')); }

After the modification the block of lines 215-223 will look like this:
Code:
if(JRequest::getCmd('option') == 'com_customproperties') { $tagName = JRequest::getVar('tagName', ''); $tagId = JRequest::getVar('tagId', ''); $tagGroup = JRequest::getVar('tagGroup', ''); $tagGid = JRequest::getVar('tagGid', ''); if(empty($tagGroup)){ $tagGroup = substr($tagName, 0, strpos($tagName, ':')); } }

This modification will be permanently added to the next release of Custom Properties.

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds