[BUGFIX] Enable icon for "Show Content From Page" for root page 35/44335/2
authorJan Helke <typo3@helke.de>
Wed, 28 Oct 2015 16:27:57 +0000 (17:27 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 28 Oct 2015 16:57:25 +0000 (17:57 +0100)
When the root page is showing content from another page now the
correct "root" icon is displayed instead of the icon for normal
pages.

Resolves: #70617
Releases: master
Change-Id: I42d7aae521b40518d8087b004c44af02aeb9a177
Reviewed-on: https://review.typo3.org/44335
Reviewed-by: Benjamin Kott <info@bk2k.info>
Tested-by: Benjamin Kott <info@bk2k.info>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Imaging/IconFactory.php
typo3/sysext/core/Configuration/TCA/pages.php
typo3/sysext/core/ext_tables.php

index 49a1385..5ecb1e8 100644 (file)
@@ -203,7 +203,11 @@ class IconFactory
                     $recordType[4] = 'contains-' . $row['module'];
                 }
                 if ((int)$row['content_from_pid'] > 0) {
-                    $recordType[4] = (int)$row['nav_hide'] === 0 ? 'page-contentFromPid' : 'page-contentFromPid-hideinmenu';
+                    if ($row['is_siteroot']) {
+                        $recordType[4] = 'page-contentFromPid-root';
+                    } else {
+                        $recordType[4] = (int)$row['nav_hide'] === 0 ? 'page-contentFromPid' : 'page-contentFromPid-hideinmenu';
+                    }
                 }
             }
             if (is_array($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'])) {
index cec41d7..7fb4e07 100644 (file)
@@ -53,6 +53,7 @@ return array(
             'contains-board' => 'apps-pagetree-folder-contains-board',
             'contains-news' => 'apps-pagetree-folder-contains-news',
             'page-contentFromPid' => 'apps-pagetree-page-content-from-page',
+            'page-contentFromPid-root' => 'apps-pagetree-page-content-from-page-root',
             'page-contentFromPid-hideinmenu' => 'apps-pagetree-page-content-from-page-hideinmenu',
             'default' => 'apps-pagetree-page-default'
         ),
index 68e9816..8220db7 100644 (file)
@@ -301,6 +301,7 @@ $GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'] = array(
     'apps-pagetree-page-backend-users-hideinmenu',
     'apps-pagetree-page-backend-users-root',
     'apps-pagetree-page-content-from-page',
+    'apps-pagetree-page-content-from-page-root',
     'apps-pagetree-page-content-from-page-hideinmenu',
     'apps-pagetree-page-default',
     'apps-pagetree-page-domain',