[TYPO3-english] menu li and elementUid

Christopher Torgalson bedlamhotel at gmail.com
Tue Feb 24 17:11:17 CET 2009


On Tue, Feb 24, 2009 at 7:41 AM, Jacco van der Post
<jacco at id-internetservices.com> wrote:
> 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>


Simple. Replace "after = </li>" with "wrapItemAndSub = |</li>".

Also, just a comment on the other code: there's probably not any need
for the <span> around the link :)

-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list