[TYPO3-english] Re: Typoscript: How to to add the Page Title to the Header text of a Content Element?

Howard howard.klevansky at gmail.com
Sun Mar 17 22:42:09 CET 2013

ah ... here we go, using lib.stdheader

thanks to http://www.typo3-addict.com/2010/03/a-custom-header-layout/

# Overwrite layout 5 for example
# Create an array of objects
lib.stdheader.10.5 = COA
lib.stdheader.10.5 {
   # First object is a copy of the default header layout 1, 
   # so the basic input is printed. (e.g. the field 'header')
   10 < lib.stdheader.10.1
   10.fontTag = <h2{register:headerStyle}{register:headerClass}>|

   # Second object: The page title to be appended.
   20 = TEXT
   20.value =   {page:title}
   20.insertData = 1
   # Third object: Closing the H2 tag which we opened 
   # in the first object.
   30 = TEXT
   30.value = </h2>

Hmmm .. now for the condition when applying this. One option is to apply per Header type (in above it will only apply to layout5)
But what about the condition being dependent upon a key word in the existing Content Element Header? Or would that overload the system?

More information about the TYPO3-english mailing list