Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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.
# 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
You can’t perform that action at this time.