[TYPO3-english] tt_content show subheader
Bob Wild
rowild at gmx.net
Wed Sep 16 15:22:24 CEST 2009
Hi, list,
This is just sth I would like to share with the community.
After building an ext for a subtitle field in tt_content, I had to
realize that there is already one, but it is not available in all
Content Types, and it is really missing in CType Text.
(I can't make up an opinion on why that possibly is a wise solution...
Any understandable reason for that?)
Anyway, Typo3 of course can do it. This is how:
Add the following line to extTables.php:
t3lib_extMgm::addToAllTCAtypes("tt_content", 'subheader;;8', '',
'after:header');
Now the field is shown in the beackend.
To show its content also in the FrontEnd, add these lines to your basic
TS-setup (somewhere before you assign your content to a marker or subpart):
lib.stdheader.20 = TEXT
lib.stdheader.20 {
field = subheader
wrap = <h2>|</h2>
}
Not much, but I hope this helps somebody!
Regards,
Robert
More information about the TYPO3-english
mailing list