Typoscript: wrap only if content is not empty

Total
0
Shares

Often i run into this problem in TYPO3 : i have to wrap a content element with Typoscript but ONLY if there is content. This has an easy solution but all too often i forget it and have to search it up again. So this time i post it here and maybe it helps others too.

subparts.col2 < styles.content.getRight
subparts.col2.stdWrap {
       wrap = 
|
required = 1 }
1 comment
  1. Thank you very much.

    At first I tried something with if and if Empty :)

    Greets from Germany
    Sebastian

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like