[TYPO3] finding length of menu text string in HMENU

Tapio Markula tapio.markula at atwebteam.com
Wed Nov 22 19:52:53 CET 2006


Syed S Rahman kirjoitti:
> Hi all,
> 
> I am using a suckerfish css horizontal dropdown menu in my template. Is 
> it possible to add a style="width:xxx;" attribute to my wraps using 
> typoscript so that the menu fits well into the template.
> 
> To be more clear here's the existing markup:
> 
> <ul id="nav">
>     <li><a href="#">Percoidei</a>
>         <ul>
>             <li><a href="#">Remoras</a></li>
>             <li><a href="#">Tilefishes</a></li>
>             <li><a href="#">Bluefishes</a></li>
>             <li><a href="#">Tigerfishes</a></li>
>         </ul>
>     </li>
> 
>     <li><a href="#">Anabantoidei</a>
>         <ul>
>             <li><a href="#">Climbing perches</a></li>
>             <li><a href="#">Labyrinthfishes</a></li>
>             <li><a href="#">Kissing gouramis</a></li>
>             <li><a href="#">Pike-heads</a></li>
>             <li><a href="#">Giant gouramis</a></li>
>         </ul>
>     </li>
>     <!-- etc. -->
> </ul>
> 
> I want to add the style attribute to the all the first level li tags 
> (direct descendants of ul).
> 
> Any help in this regard will be appreciated. Thanks in advance.
#nav li { width:...}
#nav li li { width:auto }
you can generate
  <ul>
              <li class="firstLevel"><a href="#">Remoras</a></li>

with TypoScript



More information about the TYPO3-english mailing list