103 $this->backPath =
$GLOBALS[
'BACK_PATH'];
109 $this->hasFilterBox = !
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.hideFilter');
112 $this->pagetree->ext_IconMode =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.disableIconLinkToContextmenu');
113 $this->pagetree->ext_showPageId =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.showPageIdWithTitle');
114 $this->pagetree->ext_showNavTitle =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.showNavTitle');
115 $this->pagetree->ext_separateNotinmenuPages =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.separateNotinmenuPages');
116 $this->pagetree->ext_alphasortNotinmenuPages =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.alphasortNotinmenuPages');
117 $this->pagetree->thisScript =
'alt_db_navframe.php';
118 $this->pagetree->addField(
'alias');
119 $this->pagetree->addField(
'shortcut');
120 $this->pagetree->addField(
'shortcut_mode');
121 $this->pagetree->addField(
'mount_pid');
122 $this->pagetree->addField(
'mount_pid_ol');
123 $this->pagetree->addField(
'nav_hide');
124 $this->pagetree->addField(
'nav_title');
125 $this->pagetree->addField(
'url');
136 public function initPage() {
138 $this->doHighlight = !
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.disableTitleHighlight');
140 if ($this->doHighlight) {
141 $hlClass =
$GLOBALS[
'BE_USER']->workspace === 0 ?
'active' :
'active active-ws wsver' .
$GLOBALS[
'BE_USER']->workspace;
145 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
146 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/alt_db_navframe.html');
147 $this->doc->showFlashMessages = FALSE;
150 $this->doc->getDragDropCode(
'pages');
151 $this->doc->getContextMenuCode();
153 $pageRenderer = $this->doc->getPageRenderer();
154 $pageRenderer->loadScriptaculous(
'effects');
155 $pageRenderer->loadExtJS();
156 if ($this->hasFilterBox) {
157 $pageRenderer->addJsFile(
'sysext/backend/Resources/Public/JavaScript/pagetreefiltermenu.js');
159 $this->doc->JScode .= $this->doc->wrapScriptTags(($this->currentSubScript ?
'top.currentSubScript=unescape("' . rawurlencode($this->currentSubScript) .
'");' :
'') .
' 160 // setting prefs for pagetree and drag & drop 161 ' . ($this->doHighlight ?
'Tree.highlightClass = "' . $hlClass .
'";' :
'') .
' 163 // Function, loading the list frame from navigation tree: 164 function jumpTo(id, linkObj, highlightID, bank) { // 165 var theUrl = top.TS.PATH_typo3 + top.currentSubScript ; 166 if (theUrl.indexOf("?") != -1) { 167 theUrl += "&id=" + id 169 theUrl += "?id=" + id 171 top.fsMod.currentBank = bank; 172 top.TYPO3.Backend.ContentContainer.setUrl(theUrl); 174 ' . ($this->doHighlight ?
'Tree.highlightActiveItem("web", highlightID + "_" + bank);' :
'') .
' 175 if (linkObj) { linkObj.blur(); } 178 ' . ($this->cMR ?
'jumpTo(top.fsMod.recentIds[\'web\'],\'\');' :
'') . ($this->hasFilterBox ?
'var TYPO3PageTreeFilter = new PageTreeFilter();' :
'') .
' 181 $this->doc->bodyTagId =
'typo3-pagetree';
191 $tree = $this->pagetree->getBrowsableTree();
193 if ($this->active_tempMountPoint) {
195 <a href="' . htmlspecialchars(
GeneralUtility::linkThisScript(array(
'setTempDBmount' => 0))) .
'">' .
$GLOBALS[
'LANG']->sl(
'LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount', TRUE) .
'</a> <br />' .
$GLOBALS[
'LANG']->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> 198 $this->content .= $flashMessage->render();
201 $this->content .=
'<div id="PageTreeDiv">' . $tree .
'</div>';
203 $this->content .= $this->doc->wrapScriptTags(
' 204 ' . ($this->doHighlight ?
'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' :
'') .
' 205 Tree.registerDragDropHandlers();');
210 'id' =>
'treeFilterReset',
211 'alt' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.resetFilter'),
212 'title' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.resetFilter')
215 'CONTENT' => $this->content
218 if (!$this->hasFilterBox) {
219 $subparts[
'###SECOND_ROW###'] =
'';
222 $this->content = $this->doc->startPage(
'TYPO3 Page Tree');
223 $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers, $subparts);
224 $this->content .= $this->doc->endPage();
225 $this->content = $this->doc->insertStylesAndJS($this->content);
250 $onclickNewPageWizard =
'top.content.list_frame.location.href=top.TS.PATH_typo3+\'db_new.php?pagesOnly=1&id=\'+Tree.pageID;';
251 $buttons[
'new_page'] =
'<a href="#" onclick="' . $onclickNewPageWizard .
'" title="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:cms/layout/locallang.xlf:newPage', TRUE) .
'">' .
IconUtility::getSpriteIcon(
'actions-page-new') .
'</a>';
255 $buttons[
'csh'] = str_replace(
'typo3-csh-inline',
'typo3-csh-inline show-right',
BackendUtility::cshItem(
'xMOD_csh_corebe',
'pagetree',
$GLOBALS[
'BACK_PATH'],
'', TRUE));
257 if ($this->hasFilterBox) {
258 $buttons[
'filter'] =
'<a href="#" id="tree-toolbar-filter-item">' .
IconUtility::getSpriteIcon(
'actions-system-tree-search-open', array(
'title' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:cms/layout/locallang.xlf:labels.filter', TRUE))) .
'</a>';
270 $wsTitle = htmlspecialchars(\
TYPO3\CMS\Workspaces\Service\WorkspaceService::getWorkspaceTitle(
$GLOBALS[
'BE_USER']->workspace));
274 'onclick' =>
'top.goToModule(\'web_WorkspacesWorkspaces\');',
275 'style' =>
'cursor:pointer;' 276 )) . $wsTitle .
'</div> 279 return $workspaceInfo;
295 if (strlen($this->setTempDBmount)) {
297 if ($set > 0 &&
$GLOBALS[
'BE_USER']->isInWebMount($set)) {
306 $temporaryMountPoint = (int)
$GLOBALS[
'BE_USER']->getSessionData(
'pageTree_temporaryMountPoint');
308 if ($temporaryMountPoint > 0 &&
$GLOBALS[
'BE_USER']->isInWebMount($temporaryMountPoint)) {
310 $this->pagetree->MOUNTS = array($temporaryMountPoint);
326 $GLOBALS[
'BE_USER']->setAndSaveSessionData(
'pageTree_temporaryMountPoint', (
int)$pageId);
344 $tree = $this->pagetree->getBrowsableTree();
345 if (!$this->pagetree->ajaxStatus) {
348 $ajaxObj->addContent(
'tree', $tree);
settingTemporaryMountPoint($pageId)
static readPageAccess($id, $perms_clause)
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
static cshItem($table, $field, $BACK_PATH, $wrap='', $onlyIconMode=FALSE, $styleAttrib='')
static getIndpEnv($getEnvName)
static makeInstance($className)
static linkThisScript(array $getParams=array())
static isLoaded($key, $exitOnError=FALSE)
static getSpriteIcon($iconName, array $options=array(), array $overlays=array())
static fixed_lgd_cs($string, $chars, $appendString='...')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
if($ajaxRegistryEntry !==NULL) $ajaxObj
ajaxExpandCollapse($params, $ajaxObj)
initializeTemporaryDBmount()