Change TYPO3 Header Layout Options

by Michael Cannon in Featured, TYPO3 · 0 comments

Customizing the TYPO3 header layout options is an old topic, but one that’s still valid today. Yesterday, I was having to look up modifying the header layout for a barebones site to add in a special header styling option. Since finding the answer took looking at a few resources, I thought I’d share my findings.

Root Page TSConfig

TCEFORM.tt_content.header_layout {
	altLabels {
		1 = 1st Heading
		2 = 2nd Heading
		3 = 3rd Heading
		4 = 4th Heading
		5 = 5th Heading
	}
	addItems {
		10 = Special 1st Heading
	}
}

Special 1st Heading TypoScript Setup

lib.stdheader.10.10 < lib.stdheader.10.1
lib.stdheader.10.10 {
  dataWrap = <h1{register:headerStyle}{register:headerClass}><span class="special">|</span></h1>
}

The important thing to keep in mind when adding, removing or modifying the TSConfig or TypoScript is to keep the keys like 1, 2, …, 10 consistent between the two. The index is how you know which is which.

References

What’s your favorite TYPO3 header_layout customization?

Be Sociable, Share!

Related Entries

About Michael Cannon

Hello, I'm Michael Cannon, Peichi's smiling man, an adventurous water-ratchief technology officer, cyclist, poet, WWOOF'er and world traveler.

Previous post:

Next post: