[Typo3] linkWrap, enforce closing tag

Darren Clark typo3 at cwebd.co.uk
Mon Sep 19 01:00:22 CEST 2005


I've been racking my brains about this for a while.

I'd like to create a TMENU that creates the following code:

<ul>
<li>

(repeat this code)

<ul>
<li>first element</li>
<li>second element</li>
<li>third element</li>
<li>fourth element</li>
</ul>
<li>

( end of repeat block )


</li>
</ul>

I have the the following typoscript:

<code>
temp.menu_v2 = HMENU
temp.menu_v2.entryLevel = 1
temp.menu_v2.1 = TMENU
temp.menu_v2.1 {
wrap = <ul>|</ul>
}

temp.menu_v2.1.NO {
linkWrap = |*| <li><ul><li>|</li> || <li>|</li> || <li>|</li> || <li>|</li></ul></li>
}

lib.globalnav < temp.menu_v2
</code>

Now the problem is, if the number of menu items are exactly divisible by
4 then it works perfectly, but if not then the final </ul></li> is missed
off.

Any ideas on how I can do this? Is it possible with typoscript or would
it require an extension?

Cheers

--
Darren



More information about the TYPO3-english mailing list