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
Labels |
Added:
?
|
@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...
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?
hi davdebcom
thanks for your time
yes you can close it
bye
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-28 15:19:49 |
Closed_By | ⇒ | roland-d |
Closed as per topic starter request as a solution has been found.
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