How to enable subheader field in tt_content

In order to enable "subheader" field in tt_content you can follow the procedure:

  1. 1) Enable “subheader” field in all different tt_content types (or you can decide for a specific type). Go in TSREF Setup (Typoscript) and paste the following lines of code:
    //——ENABLE SUBHEADER———–
    lib.subheader = TEXT
    lib.subheader {
    field = subheader
    required = 1
    dataWrap = <h5 class=“subheader subheaderlayout-{field:layout}”>|</h5>
    htmlSpecialChars = 1
    editIcons = tt_content:subheader,layout
    editIcons.beforeLastTag = 1
    editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.subheader
    prefixComment = 2 | Subheader:
    }
    //—————————————–
    tt_content.header {
    20 >
    20 < lib.subheader
    }
    tt_content.text {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.image {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.textpic {
    10.15 = TEXT
    10.15 < lib.subheader
    }
    tt_content.bullets {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.table {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.uploads {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.table {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.multimedia {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.swfobject {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.qtobject {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.media {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.search {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.login {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.splash {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.menu {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.shortcut {
    15 = TEXT
    15 < lib.subheader
    }
    tt_content.list {
    15 = TEXT
    15 < lib.subheader
    }
  2. 2) Now you need to enable the field in TCA of TYPO3. (typo3conf/extables.php) Go in typo3conf and add the following lines of code in “extTables.php” file:
    #re-enabling subheader in tt_content
    t3lib_div::loadTCA('tt_content');
    t3lib_extMgm::addToAllTCAtypes("tt_content", 'subheader;;', 'text,textpic', 'before:bodytext');