getTemplateLayoutsFromTsConfig($pageUid) as $templateKey => $title) { if (str_starts_with($title, '--div--')) { $optGroupParts = GeneralUtility::trimExplode(',', $title, true, 2); $title = $optGroupParts[1]; $templateKey = $optGroupParts[0]; } $templateLayouts[] = [$title, $templateKey]; } return $templateLayouts; } /** * Get template layouts defined in TsConfig * * @param $pageUid * @return array */ protected function getTemplateLayoutsFromTsConfig(int $pageUid): array { $templateLayouts = []; $pagesTsConfig = BackendUtility::getPagesTSconfig($pageUid); if (isset($pagesTsConfig['tx_news.']['templateLayouts.']) && is_array($pagesTsConfig['tx_news.']['templateLayouts.'])) { $templateLayouts = $pagesTsConfig['tx_news.']['templateLayouts.']; } return $templateLayouts; } }