[TYPO3-english] css class to jsmenu select tag
Jigal van Hemert
jigal.van.hemert at typo3.org
Sun Jan 31 10:15:09 CET 2016
Hi,
On 29/01/2016 12:30, Katja Lampela wrote:
> The resulted menu is a select dropdown menu and now I try to figure out
> how (if possible) to add css class to the select part.
[...]
> temp.rootline_sel = COA
> temp.rootline_sel {
> 10 = HMENU
> 10 {
> 1 = JSMENU
> 1 {
> levels=2
> target = parent
> 1.showActive=1
> 1.showFirst = TRUE
> 1.alwaysLink = 1
> 1.wrap= <div class="wrappingclass">|</div>
> 2 < .1
> 3 < .2
> 4 < .3
> }
> }
> }
Each level inside JSMENU is of type JSMENUITEM. TSref shows a property
additionalParams with description:
-------------------
Additional parameters to the <select> box. E.g. you could set the width
with a style-parameter like this:
additionalParams = style="width: 200px;"
-------------------
In your case you could use it to add the class
temp.rootline_sel.10.1.1.additionalParams = class="selectclass"
For the each level you can set a different class name.
You'll still get the onchange, because it is after all a JavaScript menu.
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list