[TYPO3-english] css class to jsmenu select tag

Katja Lampela katja.lampela at lieska.net
Fri Jan 29 12:30:11 CET 2016


Hi,

I found this great menu type, jsmenu with which you can create multi 
level - kind of filtered - pages menu.

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.
This way I might be able to turn it to a bootstrap select menu
http://silviomoreto.github.io/bootstrap-select/examples/

Here's the menu:

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
     }
   }
}

This results:

<div class="wrappingclass">
<select name="selector1" onchange="JSmenu8b60d.act(1);">
   <option value="0"> </option>
   <option value="1">First page</option>
   <option value="22">Second page</option>
</select>
</div>

(Don't ask me how those values are defined, they are not page id's.)

I would want:

<div class="wrappingclass">
<select name="selector1" class="selectclass">
   <option value="0"> </option>
   <option value="1">First page</option>
   <option value="22">Second page</option>
</select>
</div>


Is it possible? In ts reference I didn't figure out solution, but I 
don't really know how wrapAfterTags or the itemArrayProcFunc works.

What other suggestions would you have to create this?

Thank you!


-- 
Kind regards,
Katja Lampela
www.lieska.net


More information about the TYPO3-english mailing list