[TYPO3] finding length of menu text string in HMENU

Syed S Rahman syedsrahman at gmail.com
Wed Nov 22 19:54:29 CET 2006


Syed S Rahman wrote:
> 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.
> 
> Syed S. Rahman.
> syedsrahman at gmail.com
Hi,

I am really sorry but I forgot to add one thing in my query. I want to 
add the style="width:xxx;" attribute based on the length of the string 
present inside the <li><a>string</a></li> tag, which is generated by the 
HMENU cObject.



More information about the TYPO3-english mailing list