Translations
Info
All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

warning - Message

Important notice: This wiki is scheduled to be disabled in 2021. We are in the process of migrating content to the official documentation on docs.typo3.org. If you find information here that is missing from the official documentation, please feel free to get in contact with us on TYPO3 Slack (Channel: #t3docs-sig-wiki-migration).

Additional columns in WEB-Page Module

From TYPO3Wiki
Jump to navigation Jump to search
Content Type: HowTo.


Question:
For which TYPO3 versions does this Wiki page apply?, Sypets 2020-04-17
Please remove "{{Question}}" when the problem is solved. See all questions.

TCA Overrides

Place this code in an extension inside the file Configuration/TCA/Overrides/tt_content.php:

$GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'] = array(
	'3' => array('Kopfzeile', '3'),
	'2' => array('Rechts', '2'),
	'1' => array('Links', '1'),
	'0' => array('Mitte', '0'),
	'4' => array('Fusszeile', '4')
);

TCA Reference » columns

Page TSconfig

In your Page TSconfig you have to set this value:

mod.SHARED.colPos_list = 1,0,2,3,4

(added item no. 4)

TSconfig Reference » colPos_list

TypoScript Setup

In order to use the content of that column in a page, you can use this code in your TypoScript setup field:

temp.additionalcolumn = CONTENT
temp.additionalcolumn {
	table = tt_content
	select {
		pidInList = this
		orderBy = sorting
		where = colPos = 4
		languageField = sys_language_uid
	}
}

This will make the content from column number 4 available in temp.additionalcolumn, which you can then include in the output of your page.