2 namespace TYPO3\CMS\Backend\Controller;
115 $this->pagetree->ext_IconMode = $beUser->getTSConfigVal(
'options.pageTree.disableIconLinkToContextmenu');
116 $this->pagetree->ext_showPageId = (bool)$beUser->getTSConfigVal(
'options.pageTree.showPageIdWithTitle');
117 $this->pagetree->ext_showNavTitle = (bool)$beUser->getTSConfigVal(
'options.pageTree.showNavTitle');
118 $this->pagetree->ext_separateNotinmenuPages = $beUser->getTSConfigVal(
'options.pageTree.separateNotinmenuPages');
119 $this->pagetree->ext_alphasortNotinmenuPages = $beUser->getTSConfigVal(
'options.pageTree.alphasortNotinmenuPages');
120 $this->pagetree->thisScript =
'alt_db_navframe.php';
121 $this->pagetree->addField(
'alias');
122 $this->pagetree->addField(
'shortcut');
123 $this->pagetree->addField(
'shortcut_mode');
124 $this->pagetree->addField(
'mount_pid');
125 $this->pagetree->addField(
'mount_pid_ol');
126 $this->pagetree->addField(
'url');
137 public function initPage()
140 $doHighlight = !$this->
getBackendUser()->getTSConfigVal(
'options.pageTree.disableTitleHighlight');
143 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/alt_db_navframe.html');
144 $this->doc->showFlashMessages =
false;
148 $dragDropCode =
'Tree.registerDragDropHandlers();';
154 Tree.highlightClass = "' . $hlClass .
'";
155 Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);';
158 $this->doc->getDragDropCode(
'pages', $dragDropCode);
159 $this->doc->getContextMenuCode();
162 $pageRenderer->loadExtJS();
163 $this->doc->JScode .= $this->doc->wrapScriptTags(($this->currentSubScript ?
'top.currentSubScript=unescape("' . rawurlencode($this->currentSubScript) .
'");' :
'') .
'
164 // Function, loading the list frame from navigation tree:
165 function jumpTo(id, linkObj, highlightID, bank) { //
166 var theUrl = top.currentSubScript ;
167 if (theUrl.indexOf("?") != -1) {
168 theUrl += "&id=" + id
170 theUrl += "?id=" + id
172 top.fsMod.currentBank = bank;
173 top.TYPO3.Backend.ContentContainer.setUrl(theUrl);
175 ' . ($doHighlight ?
'Tree.highlightActiveItem("web", highlightID + "_" + bank);' :
'') .
'
176 if (linkObj) { linkObj.blur(); }
179 ' . ($this->cMR ?
'jumpTo(top.fsMod.recentIds[\'web\'],\'\');' :
'') .
'
182 $this->doc->bodyTagId =
'typo3-pagetree';
193 $tree = $this->pagetree->getBrowsableTree();
195 if ($this->active_tempMountPoint) {
197 <a href="' . htmlspecialchars(
GeneralUtility::linkThisScript(array(
'setTempDBmount' => 0))) .
'">' . $this->
getLanguageService()->sl(
'LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount',
true) .
'</a> <br />' . $this->
getLanguageService()->sl(
'LLL:EXT:lang/locallang_core.xlf:labels.path',
true) .
': <span title="' . htmlspecialchars($this->active_tempMountPoint[
'_thePathFull']) .
'">' . htmlspecialchars(
GeneralUtility::fixed_lgd_cs($this->active_tempMountPoint[
'_thePath'], -50)) .
'</span>
200 $this->content .= $flashMessage->render();
203 $this->content .=
'<div id="PageTreeDiv">' . $tree .
'</div>';
208 'CONTENT' => $this->content
211 $this->content = $this->doc->startPage(
'TYPO3 Page Tree');
212 $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers);
213 $this->content .= $this->doc->endPage();
214 $this->content = $this->doc->insertStylesAndJS($this->content);
240 $onclickNewPageWizard =
'top.content.list_frame.location.href=' .
GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl(
'db_new', [
'pagesOnly' => 1,
'id' =>
''])) .
'+Tree.pageID;';
241 $buttons[
'new_page'] =
'<a href="#" onclick="' . $onclickNewPageWizard .
'" title="' . $this->
getLanguageService()->sL(
'LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newPage',
true) .
'">'
242 . $this->iconFactory->getIcon(
'actions-page-new',
Icon::SIZE_SMALL)->render()
247 $buttons[
'csh'] = str_replace(
'typo3-csh-inline',
'typo3-csh-inline show-right',
BackendUtility::cshItem(
'xMOD_csh_corebe',
'pagetree'));
261 $workspaceInfo =
'<div class="bgColor4 workspace-info"><span title="' . $wsTitle .
'" onclick="top.goToModule(\'web_WorkspacesWorkspaces\');" style="cursor:pointer;">'
262 . $this->iconFactory->getIcon(
'apps-toolbar-menu-workspace',
Icon::SIZE_SMALL)->render() .
'</span>'
263 . $wsTitle .
'</div>';
267 return $workspaceInfo;
284 if ((
string)$this->setTempDBmount !==
'') {
286 if ($set > 0 && $beUser->isInWebMount($set)) {
295 $temporaryMountPoint = (int)$beUser->getSessionData(
'pageTree_temporaryMountPoint');
297 if ($temporaryMountPoint > 0 && $beUser->isInWebMount($temporaryMountPoint)) {
299 $this->pagetree->MOUNTS = array($temporaryMountPoint);
315 $this->
getBackendUser()->setAndSaveSessionData(
'pageTree_temporaryMountPoint', (
int)$pageId);
334 $tree = $this->pagetree->getBrowsableTree();
335 if (!$this->pagetree->ajaxStatus) {
338 $response->
getBody()->write(json_encode($tree));