2
votes

Hello everybody i have a menu in typoscript and i would like the generated HTML to look like this

<a href=" ">Text<span></span></a>

I am able to wrap Text inside span tags but i cannot find a way to to put an empty span tag on the right of Text. Does anyone have an idea?

2

2 Answers

2
votes

Pretty weird to put empty tags on purpose, but here you go:

HMENU.TMENU.TMENUITEM.stdWrap.wrap = |<span></span>

For reference, here is the list of wraps you can use for menus:

<wrapItemAndSub>
 <allWrap>
 <allStdWrap>
 <before>
 <beforeImg beforeImgTagParams>
 <linkWrap>
  <A href=… ATagParams TITLE=ATagTitle>
   <stdWrap.wrap> TMENUITEM </stdWrap.wrap>
  </A>
 </linkWrap>
 <after>
 </allStdWrap>
 </allWrap>
  UNTERMENU 1
  UNTERMENU 2
</wrapItemAndSub>
2
votes

Here is another way, using linkWrap and ATagBeforeWrap:

menu = HMENU
menu {
    1 = TMENU
    1 {
        NO {
            linkWrap = |<span></span>
            ATagBeforeWrap = 1
        }
    }
    # ...
}