[TYPO3-english] dynamic content snippets

Victor Livakovsky v-tyok at mail.ru
Mon Jan 17 22:43:47 CET 2011


Hi, Mario.

I've changed my extension for your case. It does really simple task: 
substitutes defined markers in content with text.
1. Get and install an extension [1]
2. Create a mapping in your TS template this way:
config.fe_hooks.mapping {
  headmaster = Jon Bauer
  opening_hours = 13:00 - 15:30
  something_else = Very important
}
3. Create some CE and add markers in your content this way:
our headmaster is ###HEADMASTER###
we opened at: ###OPENING_HOURS### only and this is ###SOMETHING_ELSE###

Note: markers in your content must be uppercase! Case of markers in TS 
doesn't matter.
Note 2: since content of markers is passed through htmlspecialchars for 
security reasons, you can't define html tags in markers. But you may always 
wrap the marker directly in your content element ;)


[1] http://bit.ly/fFHzOY 



More information about the TYPO3-english mailing list