[TYPO3] wraping TMENUITEM linktext

JoH info at cybercraft.de
Tue Jul 25 22:20:06 CEST 2006

> But I want to wrap just the text not the whole link.

So you need at least one of the itemstates IFSUB, ACT, ACTIFSUB, CURIFSUB.

> For example to wrap with <xyz> </xyz> becomes:
> <a href="domain.com">  <xyz> Domain </xyz>  </a>
> I need this because I don't think you can wrap just the '</a>' tag.
> Or am I wrong?
> I REALLY want to wrap this:
> <a href="domain.com">  Domain <xyz> </a> </xyz>
> becasue I want to put a conditional execution on that tag. But I
> don't think this is possible.

What do you mean by "conditional execution"?
If <xyz> stands for a real tag the resulting HTML will definitely not

But anyway here's a solution:

    linkWrap = <xyz>|
    ATagBeforeWrap = 1
    allWrap = |</xyz>

This only makes sense, if you enabled the "expAll" property.
I guess the best solution would be to use ACT + CUR + CURIFSUB.
ACT will be the state for all "parent" items of the currently opened menu
CURIFSUB will be triggered when the current item itself is the "parent"
CUR will be used when the current item has no child pages.

ACT = 1
    linkWrap = <xyz>|
    ATagBeforeWrap = 1
    allWrap = <li>|</xyz></li>
CUR = 1
    linkWrap = |
    allWrap = <li>|</li>

Not tested, but should be working.


Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com

More information about the TYPO3-english mailing list