Skip to content

Instantly share code, notes, and snippets.

@alrnz
Last active January 24, 2017 13:10
Show Gist options
  • Save alrnz/281a1d3284e73926f0bd82cc64e0cbe8 to your computer and use it in GitHub Desktop.
Save alrnz/281a1d3284e73926f0bd82cc64e0cbe8 to your computer and use it in GitHub Desktop.
Replace a | in a string with a username. This is just an example to show how complex replacements in TypoScript works. Please don't insert a username on every page like this. It kills caching.
stdWrap.replacement {
10 {
search = |
replace.stdWrap.cObject = COA
replace.stdWrap.cObject {
10 = TEXT
10.data = TSFE:fe_user|user|first_name
10.noTrimWrap = || |
20 = TEXT
20.data = TSFE:fe_user|user|last_name
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment