[TYPO3-english] menu li and elementUid

Jacco van der Post jacco at id-internetservices.com
Tue Feb 24 16:41:44 CET 2009


I want to have my menu li items having a elementUid. I have 2 questions.

This apparently often used but wrong example seems to work :

lib.inc_menu = HMENU
lib.inc_menu {
	1 = TMENU
	1.noBlur = 1
	1 {
		wrap = <ul>|</ul>
		NO {
			ATagTitle.field = description

       before = <li id="t-{elementUid}">|*|<li 
id="t-{elementUid}">|*|<li id="t-{elementUid}" class="last">
       after = </li>
       subst_elementUid = 1
			ATagBeforeWrap = 1
                 	linkWrap= <span>|</span>

It produces code like :

<li id="t-97"> item </li>
<li id="t-95"> item </li>
   <li id="t-94"> item </li>
   <li id="t-93"> item </li>
<li id="t-92"> item </li>

However the example above is semantically incorrect according to 
and I run into troubles with Internet Explorer.

It should be :

<li> item </li>
<li> item
   <li> item </li>
   <li> item </li>
<li> item </li>


Now by replacing "before" and "after" by

wrapItemAndSub = <li id="t-{elementUid}">|</li>||*||*|<li 
id="t-{elementUid}" class="last">|</li>|

It produces the 2nd example. However the subst_elementUid does not seem 
to work with wrapItemAndSub.

 >> Question 1 :
Even with the tsref page 11 explanation about optionSplit, I can't 
figure out what ||*||*|  means and why after the last </li> still | 
comes.  (I do understand |*||*| or pipes ).

 >> Question 2 :
Could someone help me with building the semantically right menu on which 
the li's get an elementUid? (so not the atags by ATagParams).



More information about the TYPO3-english mailing list