[TYPO3-english] menu li and elementUid

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


Hi,

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 :

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

However the example above is semantically incorrect according to 
http://www.w3schools.com/HTML/tryit.asp?filename=tryhtml_nestedlists2 
and I run into troubles with Internet Explorer.

It should be :

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

-------------

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).


Thanks

Jacco




More information about the TYPO3-english mailing list