From c6bfce9cafc77a31992bcf8f34ec0ac94fec5fa3 Mon Sep 17 00:00:00 2001 From: Georg Tiefenbrunn Date: Wed, 27 May 2015 15:00:02 +0200 Subject: [PATCH] [TASK] Hide package label in page layout selector if no page layouts are provided --- Classes/Backend/PageLayoutSelector.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Classes/Backend/PageLayoutSelector.php b/Classes/Backend/PageLayoutSelector.php index 7352bbaf..021d3734 100755 --- a/Classes/Backend/PageLayoutSelector.php +++ b/Classes/Backend/PageLayoutSelector.php @@ -133,19 +133,21 @@ protected function renderInheritanceField(array $parameters) { */ protected function renderOptions($extension, array $group, array $parameters) { $selector = ''; - $extensionKey = ExtensionNamingUtility::getExtensionKey($extension); - if (FALSE === ExtensionManagementUtility::isLoaded($extensionKey)) { - $groupTitle = ucfirst($extension); - } else { - $emConfigFile = ExtensionManagementUtility::extPath($extensionKey, 'ext_emconf.php'); - require $emConfigFile; - $groupTitle = $EM_CONF['']['title']; - } + if (FALSE === empty($group)) { + $extensionKey = ExtensionNamingUtility::getExtensionKey($extension); + if (FALSE === ExtensionManagementUtility::isLoaded($extensionKey)) { + $groupTitle = ucfirst($extension); + } else { + $emConfigFile = ExtensionManagementUtility::extPath($extensionKey, 'ext_emconf.php'); + require $emConfigFile; + $groupTitle = $EM_CONF['']['title']; + } - $packageLabel = LocalizationUtility::translate('pages.tx_fed_page_package', 'Fluidpages'); - $selector .= '

' . $packageLabel . ': ' . $groupTitle . '

' . LF; - foreach ($group as $template) { - $selector .= $this->renderOption($extension, $template, $parameters); + $packageLabel = LocalizationUtility::translate('pages.tx_fed_page_package', 'Fluidpages'); + $selector .= '

' . $packageLabel . ': ' . $groupTitle . '

' . LF; + foreach ($group as $template) { + $selector .= $this->renderOption($extension, $template, $parameters); + } } return $selector; }