Skip to content

Instantly share code, notes, and snippets.

@Bjoelin
Created August 19, 2016 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bjoelin/dadf1edf30b3d2995bd3b9e28b861191 to your computer and use it in GitHub Desktop.
Save Bjoelin/dadf1edf30b3d2995bd3b9e28b861191 to your computer and use it in GitHub Desktop.
TYPO3 - TCA Input Field Rendering Example - Select Tree
'selected_categories' => array(
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:selected_categories',
'config' => array(
'type' => 'select',
'renderType' => 'selectTree',
'foreign_table' => 'sys_category',
'foreign_table_where' => 'AND sys_category.sys_language_uid IN (0,-1) ORDER BY sys_category.title ASC',
'size' => 10,
'autoSizeMax' => 50,
'maxitems' => 9999,
'treeConfig' => array(
'parentField' => 'parent',
'appearance' => array(
'expandAll' => true,
'showHeader' => true,
),
),
)
),
'category_field' => array(
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:category_field',
'config' => array(
'type' => 'select',
'renderType' => 'selectSingle',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'itemsProcFunc' => \TYPO3\CMS\Core\Category\CategoryRegistry::class . '->getCategoryFieldsForTable',
)
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment