Last active
December 27, 2015 11:39
-
-
Save paulrohrbeck/7319589 to your computer and use it in GitHub Desktop.
TYPO3 / TypoScript: This snippet adds a class (eg. class="page-pagetitle") to the body tag of a TYPO3 page. The page title is dynamically pulled from the page properties, all non-word characters are removed and the title is transformed to lower case letters only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add a class with the page title to the body tag: | |
bodyTag > | |
bodyTagCObject = TEXT | |
bodyTagCObject { | |
data = field:title | |
case = lower | |
stdWrap.replacement { | |
10 { | |
search = #\W#i | |
replace = | |
useRegExp = 1 | |
} | |
} | |
wrap = <body class="page-|"> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment