?
avatar maofree
maofree
23 Dec 2013

Hi
It is not possible to add a class to a tag "li" of a branch of the main menu, it is possible just for the tag "a".

instead to the tag "a" it is not possible to add data-toggle="dropdown"
to use the navbar of bootstrap

the same problems for the sub-menus. The solution is to use the override method into the theme, but into the back-office should be more input text to manage easily custom style like to use bootstrap navbar

bye

avatar maofree maofree - open - 23 Dec 2013
avatar nicksavov
nicksavov - comment - 14 Oct 2014

Hi @maofree ,

Could you send in a pull request for this feature request? Here's how to do that:
http://docs.joomla.org/Git_for_Coders

avatar brianteeman brianteeman - change - 3 Jan 2015
Labels Added: ?
avatar davdebcom
davdebcom - comment - 28 Feb 2015

@maofree Your description of your feature request is pretty basic/short. It would help if you add more details in the future, so it's easier for other people to understand what issue you are facing.

This is actually a feature request. Go to Menus > Select your main menu > Open a menu item, preferably home > Go to tab "Link type" > find the field "Link CSS Style" add a class, like mycrazytest. Now, go to the site, user your right mouse button and open/select "View source code" and search for (CTRL or CMD F) mycrazytest. Eventually you will find an a tag that looks like this
<a class="mytest"

And @maofree wants to add an option, to add a class like that to the li for that menu, not just the a. Now we have Link CSS Style for the<a>, he wants List item CSS Style to be added.

So:
a) it needs code
b) it needs discussion

Discussion: do we want to add this at all? You can control the output via a template override, as the PR submitter has done now, which is a better solution IMHO than adding a field for every element that might be adjusted in the backend...

avatar davdebcom
davdebcom - comment - 28 Feb 2015

I just realized with @roland-d that you might be able to use "Menu Class Suffix" in the Module for the menu, add a class there will add a class to the menu list (ul) and use CSS selectors to change the css for individual list items.

For example to get the third list item, with a menu class suffix mycrazyclass:
ul.nav.menumycrazyclass li:nth-child(3)

@roland-d This can be closed?

avatar maofree
maofree - comment - 28 Feb 2015

hi davdebcom
thanks for your time
yes you can close it

bye

avatar roland-d roland-d - change - 28 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-28 15:19:49
Closed_By roland-d
avatar roland-d roland-d - close - 28 Feb 2015
avatar roland-d roland-d - close - 28 Feb 2015
avatar roland-d
roland-d - comment - 28 Feb 2015

Closed as per topic starter request as a solution has been found.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/2723.

Add a Comment

Login with GitHub to post a comment