commit 8e0cc135a0937c5ea3aec292263fc3ce8e35e2f6
Author: Michael Stucki <michael.stucki@typo3.org>
Date:   Thu Sep 1 15:31:59 2016 +0200

    [BUGFIX] Show mountpoint path in record + link browsers if enabled in UserTS
    
    If options.pageTree.showPathAboveMounts is enabled in
    UserTS, respect the setting also in record and link
    browsers.
    
    Resolves: #77734
    Releases: master, 7.6
    Change-Id: I492d8a7eb3a8c557c231be7aaf58dfa8dd90cc7d

diff --git a/Build/Resources/Public/Less/TYPO3/_element_tree.less b/Build/Resources/Public/Less/TYPO3/_element_tree.less
index b27c1a6..ed795cc 100644
--- a/Build/Resources/Public/Less/TYPO3/_element_tree.less
+++ b/Build/Resources/Public/Less/TYPO3/_element_tree.less
@@ -158,6 +158,9 @@
 		&:before {
 			display: none;
 		}
+		&.list-tree-path {
+			margin-left: -@tree-control-size;
+		}
 		> .list-tree-group {
 			> .list-tree-control {
 				margin-left: -@tree-control-size;
diff --git a/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php b/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
index 616f770..95a9bea 100644
--- a/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
+++ b/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
@@ -396,6 +396,15 @@ abstract class AbstractTreeView
                 if (is_array($rootRec)) {
                     $firstHtml .= $this->getIcon($rootRec);
                 }
+
+                if ($this->ext_showPathAboveMounts) {
+                    $mountPointPid = $rootRec['pid'];
+                    if ($lastMountPointPid !== $mountPointPid) {
+                        $title = \TYPO3\CMS\Backend\Tree\Pagetree\Commands::getMountPointPath($mountPointPid);
+                        $this->tree[] = array('isMountPointPath' => true, 'title' => $title);
+                    }
+                    $lastMountPointPid = $mountPointPid;
+                }
             } else {
                 // Artificial record for the tree root, id=0
                 $rootRec = $this->getRootRecord();
diff --git a/typo3/sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php b/typo3/sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php
index 1ed6596..ff54f52 100644
--- a/typo3/sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php
+++ b/typo3/sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php
@@ -100,6 +100,11 @@ class ElementBrowserPageTreeView extends BrowseTreeView
         // so we know how many we have to close when all children are done rendering
         $closeDepth = [];
         foreach ($treeArr as $treeItem) {
+            if ($treeItem['isMountPointPath']) {
+                $out .= '<li class="list-tree-path">' . $treeItem['title'] . '</li>';
+                continue;
+            }
+
             $classAttr = $treeItem['row']['_CSSCLASS'];
             if ($treeItem['isFirst']) {
                 $out .= '<ul class="list-tree">';
diff --git a/typo3/sysext/backend/Resources/Public/Css/backend.css b/typo3/sysext/backend/Resources/Public/Css/backend.css
index 39a738f..12838c7 100644
--- a/typo3/sysext/backend/Resources/Public/Css/backend.css
+++ b/typo3/sysext/backend/Resources/Public/Css/backend.css
@@ -10753,6 +10753,9 @@ div.t3-form-field-container:first-child .t3-form-field-label-flex {
 .list-tree-root > li:before {
   display: none;
 }
+.list-tree-root > li.list-tree-path {
+  margin-left: -20px;
+}
 .list-tree-root > li > .list-tree-group > .list-tree-control {
   margin-left: -20px;
 }
diff --git a/typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php b/typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php
index cca4669..82fb5e4 100644
--- a/typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php
+++ b/typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php
@@ -89,6 +89,7 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
         $pageTree->ext_pArrPages = $allowedTables === 'pages';
         $pageTree->ext_showNavTitle = (bool)$backendUser->getTSConfigVal('options.pageTree.showNavTitle');
         $pageTree->ext_showPageId = (bool)$backendUser->getTSConfigVal('options.pageTree.showPageIdWithTitle');
+        $pageTree->ext_showPathAboveMounts = (bool)$backendUser->getTSConfigVal('options.pageTree.showPathAboveMounts');
         $pageTree->addField('nav_title');
         $tree = $pageTree->getBrowsableTree();
 
diff --git a/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php b/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php
index 455e8f2..154fc64 100644
--- a/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php
+++ b/typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php
@@ -119,8 +119,9 @@ class PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
         /** @var ElementBrowserPageTreeView $pageTree */
         $pageTree = GeneralUtility::makeInstance(ElementBrowserPageTreeView::class);
         $pageTree->setLinkParameterProvider($this);
-        $pageTree->ext_showPageId = (bool)$backendUser->getTSConfigVal('options.pageTree.showPageIdWithTitle');
         $pageTree->ext_showNavTitle = (bool)$backendUser->getTSConfigVal('options.pageTree.showNavTitle');
+        $pageTree->ext_showPageId = (bool)$backendUser->getTSConfigVal('options.pageTree.showPageIdWithTitle');
+        $pageTree->ext_showPathAboveMounts = (bool)$backendUser->getTSConfigVal('options.pageTree.showPathAboveMounts');
         $pageTree->addField('nav_title');
 
         $this->view->assign('temporaryTreeMountCancelLink', $this->getTemporaryTreeMountCancelNotice());
