How to add custom headers in TYPO3 backend


#Add this to page resource
Set below TypoScript Configuration in page edit porperty.

TCEFORM.tt_content.header_layout {
    addItems {
        10 = Gray Header
        11 = Orange Header
        12 = Red Header
    }
}
Custom header resource

Custom header resource

After set above TypoScript Configuration in page edit porperty. It will display in your “Type”
It will look like in below image.

Custom header in typo3

Custom header in typo3

If you want to wrap that section element with your HTML then you have to set below TypoScript

lib.stdheader.10.10 < lib.stdheader.10.1
lib.stdheader.10.10 {
  dataWrap = >h1 class="gray_header"<|>/h1<
}

lib.stdheader.10.11 < lib.stdheader.10.1
lib.stdheader.10.11 {
  dataWrap = <h1 class="orange_header">|</h1>
}

lib.stdheader.10.12 < lib.stdheader.10.1
lib.stdheader.10.12 {
  dataWrap = <h1 class="red_header">|</h1>
}

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

Advertisements

3 thoughts on “How to add custom headers in TYPO3 backend

  1. How can I make this work so that this code is automatically available for EVERY page in the tree? I tried putting the code into the setup.ts for the site, but it doesn’t work that way.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s