.. include:: /Includes.rst.txt .. _feature-99194-1669413174: =========================================================================================== Feature: #99194 - Support for various string comparisons for stdWrap.if TypoScript function =========================================================================================== See :issue:`99194` Description =========== The TypoScript function :typoscript:`if.` now supports several new sub-properties for comparing a value (provided via :typoscript:`if.value = ...`), if it contains a certain part of a string, or starts with a certain part, or ends with a certain part. All of these properties also work with the :typoscript:`if.negate` flag. The new TypoScript properties for `if.` are called: * :typoscript:`if.contains` * :typoscript:`if.startsWith` * :typoscript:`if.endsWith` All of the mentioned properties can be assigned a static value, and support :typoscript:`stdWrap` as their sub-properties. Impact ====== As :typoscript:`if.` is available in most content objects, :typoscript:`stdWrap` or data processors, it can now be used more exhaustive. Example for :typoscript:`ìf.contains`: .. code-block:: typoscript # Add a span tag before the page title if the page title # contains the string "media" page.10 = TEXT page.10.data = page:title page.10.htmlSpecialChars = 1 page.10.prepend = TEXT page.10.prepend.value = page.10.prepend.if.value.data = page:title page.10.prepend.if.contains = Media page.10.outerWrap =