Project

General

Profile

Bug #24117 ยป 16458.diff

Administrator Admin, 2011-01-20 17:56

View differences:

t3lib/class.t3lib_befunc.php (working copy)
't3ver_state' => $val['t3ver_state'],
't3ver_swapmode' => $val['t3ver_swapmode'],
't3ver_stage' => $val['t3ver_stage'],
'be_layout_next_level' => $val['be_layout_next_level']
'backend_layout_next_level' => $val['backend_layout_next_level']
);
if (isset($val['_ORIG_pid'])) {
$output[$c]['_ORIG_pid'] = $val['_ORIG_pid'];
......
$row = $getPageForRootline_cache[$ident];
} else {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'pid,uid,title,TSconfig,is_siteroot,storage_pid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_swapmode,t3ver_stage,be_layout_next_level',
'pid,uid,title,TSconfig,is_siteroot,storage_pid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_swapmode,t3ver_stage,backend_layout_next_level',
'pages',
'uid=' . intval($uid) . ' ' .
self::deleteClause('pages') . ' ' .
t3lib/stddb/tables.sql (working copy)
alias varchar(32) DEFAULT '' NOT NULL,
l18n_cfg tinyint(4) DEFAULT '0' NOT NULL,
fe_login_mode tinyint(4) DEFAULT '0' NOT NULL,
be_layout int(10) DEFAULT '0' NOT NULL,
be_layout_next_level int(10) DEFAULT '0' NOT NULL,
backend_layout int(10) DEFAULT '0' NOT NULL,
backend_layout_next_level int(10) DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY parent (pid,sorting,deleted,hidden),
t3lib/stddb/tbl_pages.php (working copy)
$TCA['pages'] = array(
'ctrl' => $TCA['pages']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'doktype,title,alias,hidden,starttime,endtime,fe_group,url,target,no_cache,shortcut,keywords,description,abstract,newUntil,lastUpdated,cache_timeout,be_layout,be_layout_next_level',
'showRecordFieldList' => 'doktype,title,alias,hidden,starttime,endtime,fe_group,url,target,no_cache,shortcut,keywords,description,abstract,newUntil,lastUpdated,cache_timeout,backend_layout,backend_layout_next_level',
'maxDBListItems' => 30,
'maxSingleDBListItems' => 50,
),
......
),
),
),
'be_layout' => array(
'backend_layout' => array(
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.be_layout',
'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.backend_layout',
'config' => array(
'type' => 'select',
'foreign_table' => 'be_layouts',
'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( be_layouts.pid = ###PAGE_TSCONFIG_ID### OR be_layouts.pid = ###STORAGE_PID### ) ) AND be_layouts.hidden = 0',
'foreign_table' => 'backend_layout',
'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( backend_layout.pid = ###PAGE_TSCONFIG_ID### OR backend_layout.pid = ###STORAGE_PID### ) ) AND backend_layout.hidden = 0',
'items' => array(
array('', 0),
array('LLL:EXT:cms/locallang_tca.xml:pages.be_layout.none', -1)
array('LLL:EXT:cms/locallang_tca.xml:pages.backend_layout.none', -1)
),
'selicon_cols' => 5,
'size' => 1,
......
'default' => ''
)
),
'be_layout_next_level' => array(
'backend_layout_next_level' => array(
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.be_layout_next_level',
'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.backend_layout_next_level',
'config' => array(
'type' => 'select',
'foreign_table' => 'be_layouts',
'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( be_layouts.pid = ###PAGE_TSCONFIG_ID### OR be_layouts.pid = ###STORAGE_PID### ) ) AND be_layouts.hidden = 0',
'foreign_table' => 'backend_layout',
'foreign_table_where' => 'AND ( ( ###PAGE_TSCONFIG_ID### = 0 AND ###STORAGE_PID### = 0 ) OR ( backend_layout.pid = ###PAGE_TSCONFIG_ID### OR backend_layout.pid = ###STORAGE_PID### ) ) AND backend_layout.hidden = 0',
'items' => array(
array('', 0),
array('LLL:EXT:cms/locallang_tca.xml:pages.be_layout.none', -1)
array('LLL:EXT:cms/locallang_tca.xml:pages.backend_layout.none', -1)
),
'selicon_cols' => 5,
'size' => 1,
......
'showitem' => 'is_siteroot',
),
'8' => array(
'showitem' => 'be_layout_next_level'
'showitem' => 'backend_layout_next_level'
),
'standard' => array(
'showitem' => 'doktype;LLL:EXT:cms/locallang_tca.xml:pages.doktype_formlabel',
......
'canNotCollapse' => 1,
),
'layout' => array(
'showitem' => 'layout;LLL:EXT:cms/locallang_tca.xml:pages.layout_formlabel, newUntil;LLL:EXT:cms/locallang_tca.xml:pages.newUntil_formlabel, --linebreak--, be_layout;LLL:EXT:cms/locallang_tca.xml:pages.be_layout_formlabel, be_layout_next_level;LLL:EXT:cms/locallang_tca.xml:pages.be_layout_next_level_formlabel',
'showitem' => 'layout;LLL:EXT:cms/locallang_tca.xml:pages.layout_formlabel, newUntil;LLL:EXT:cms/locallang_tca.xml:pages.newUntil_formlabel, --linebreak--, backend_layout;LLL:EXT:cms/locallang_tca.xml:pages.backend_layout_formlabel, backend_layout_next_level;LLL:EXT:cms/locallang_tca.xml:pages.backend_layout_next_level_formlabel',
'canNotCollapse' => 1,
),
'module' => array(
......
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
starttime, endtime, fe_group, extendToSubpages,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.options,
TSconfig;;6;nowrap;4-4-4, storage_pid;;7, l18n_cfg, be_layout;;8,
TSconfig;;6;nowrap;4-4-4, storage_pid;;7, l18n_cfg, backend_layout;;8,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
');
// adding doktype 2 ("Advanced")
......
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
starttime, endtime, fe_login_mode, fe_group, extendToSubpages,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.options,
TSconfig;;6;nowrap;6-6-6, storage_pid;;7, l18n_cfg, module, content_from_pid, be_layout;;8,
TSconfig;;6;nowrap;6-6-6, storage_pid;;7, l18n_cfg, module, content_from_pid, backend_layout;;8,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
');
}
t3lib/class.t3lib_page.php (working copy)
}
// Initialize:
$selFields = t3lib_div::uniqueList('pid,uid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_swapmode,title,alias,nav_title,media,layout,hidden,starttime,endtime,fe_group,extendToSubpages,doktype,TSconfig,storage_pid,is_siteroot,mount_pid,mount_pid_ol,fe_login_mode,be_layout_next_level,' . $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields']);
$selFields = t3lib_div::uniqueList('pid,uid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_swapmode,title,alias,nav_title,media,layout,hidden,starttime,endtime,fe_group,extendToSubpages,doktype,TSconfig,storage_pid,is_siteroot,mount_pid,mount_pid_ol,fe_login_mode,backend_layout_next_level,' . $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields']);
$this->error_getRootLine = '';
$this->error_getRootLine_failPid = 0;
typo3/sysext/cms/ext_tables.php (working copy)
// Add allowed records to pages:
t3lib_extMgm::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,be_layouts');
t3lib_extMgm::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,backend_layout');
// ******************************************************************
......
// ******************************************************************
// layouts
// ******************************************************************
$TCA['be_layouts'] = array (
$TCA['backend_layout'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:cms/locallang_tca.xml:be_layouts',
'title' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
typo3/sysext/cms/ext_tables.sql (working copy)
);
#
# Table structure for table 'be_layouts'
# Table structure for table 'backend_layout'
#
CREATE TABLE be_layouts (
CREATE TABLE backend_layout (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
typo3/sysext/cms/tbl_cms.php (working copy)
);
// ******************************************************************
// be_layouts
// backend_layout
// ******************************************************************
/**
* @todo add lll
*/
$TCA['be_layouts'] = array(
'ctrl' => $TCA['be_layouts']['ctrl'],
$TCA['backend_layout'] = array(
'ctrl' => $TCA['backend_layout']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'title,config,description,hidden,icon'
),
'columns' => array(
'title' => array(
'label' => 'LLL:EXT:cms/locallang_tca.xml:be_layouts.title',
'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.title',
'config' => array(
'type' => 'input',
'size' => '25',
......
)
),
'description' => array(
'label' => 'LLL:EXT:cms/locallang_tca.xml:be_layouts.description',
'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.description',
'config' => array(
'type' => 'text',
'rows' => '5',
......
)
),
'config' => array(
'label' => 'LLL:EXT:cms/locallang_tca.xml:be_layouts.config',
'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.config',
'config' => array(
'type' => 'text',
'rows' => '5',
......
'wizards' => Array(
'_PADDING' => 4,
0 => Array(
'title' => 'LLL:EXT:cms/locallang_tca.xml:be_layouts.wizard',
'title' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.wizard',
'type' => 'popup',
'icon' => t3lib_extMgm::extRelPath('cms').'layout/wizard_be_layout.png',
'script' => t3lib_extMgm::extRelPath('cms').'layout/wizard_be_layout.php',
......
)
),
'icon' => array(
'label' => 'LLL:EXT:cms/locallang_tca.xml:be_layouts.icon',
'label' => 'LLL:EXT:cms/locallang_tca.xml:backend_layout.icon',
'exclude' => 1,
'config' => array(
'type' => 'group',
typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy)
* @return mixed Uid of the backend layout record or NULL if no layout should be used
*/
function getSelectedBackendLayoutUid($id) {
$page = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('be_layout', 'pages', 'uid=' . $id);
$backendLayoutUid = intval($page['be_layout']);
$page = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('backend_layout', 'pages', 'uid=' . $id);
$backendLayoutUid = intval($page['backend_layout']);
if ($backendLayoutUid == -1) {
// if it is set to "none" - don't use any
$backendLayoutUid = NULL;
......
// if it not set check the rootline for a layout on next level and use this
$rootline = t3lib_BEfunc::BEgetRootLine($id);
for ($i = count($rootline) - 2; $i > 0; $i--) {
$backendLayoutUid = intval($rootline[$i]['be_layout_next_level']);
$backendLayoutUid = intval($rootline[$i]['backend_layout_next_level']);
if ($backendLayoutUid > 0) {
// stop searching if a layout for "next level" is set
break;
......
$out = '';
$backendLayoutUid = $this->getSelectedBackendLayoutUid($id);
$backendLayoutRecord = t3lib_BEfunc::getRecord('be_layouts', intval($backendLayoutUid));
$backendLayoutRecord = t3lib_BEfunc::getRecord('backend_layout', intval($backendLayoutUid));
$this->tt_contentConfig['showAsGrid'] = !empty($backendLayoutRecord['config']) && !$this->tt_contentConfig['languageMode'];
if (!$this->tt_contentConfig['showAsGrid']) {
......
$grid .= '<div class="t3-gridContainer"><table border="0" cellspacing="1" cellpadding="4" width="80%" height="100%" class="t3-page-columns t3-gridTable">';
// add colgroups
$colCount = intval($parser->setup['be_layout.']['colCount']);
$rowCount = intval($parser->setup['be_layout.']['rowCount']);
$colCount = intval($parser->setup['backend_layout.']['colCount']);
$rowCount = intval($parser->setup['backend_layout.']['rowCount']);
$grid .= '<colgroup>';
for ($i = 0; $i < $colCount; $i++) {
......
// cycle through rows
for ($row = 1; $row <= $rowCount; $row++) {
$rowConfig = $parser->setup['be_layout.']['rows.'][$row . '.'];
$rowConfig = $parser->setup['backend_layout.']['rows.'][$row . '.'];
if (!isset($rowConfig)) {
continue;
}
typo3/sysext/cms/layout/res/grideditor.js (working copy)
* @return string
*/
export2LayoutRecord: function() {
var result = "be_layout {\n\tcolCount = " + this.colCount + "\n\trowCount = " + this.rowCount + "\n\trows {\n";
var result = "backend_layout {\n\tcolCount = " + this.colCount + "\n\trowCount = " + this.rowCount + "\n\trows {\n";
for (var row = 0; row < this.rowCount; row++) {
result += "\t\t" + (row + 1) + " {\n";
result += "\t\t\tcolumns {\n";
typo3/sysext/cms/layout/wizard_be_layout.php (working copy)
function storeData(data) {
if (parent.opener && parent.opener.document && parent.opener.document.' . $this->formName . ' && parent.opener.document.' . $this->formName . '["' . $this->fieldName . '"]) {
parent.opener.document.' . $this->formName . '["' . $this->fieldName . '"].value = data;
parent.opener.TBE_EDITOR.fieldChanged("be_layouts","' . $uid . '","config","data[be_layouts][' . $uid . '][config]");
parent.opener.TBE_EDITOR.fieldChanged("backend_layout","' . $uid . '","config","data[backend_layout][' . $uid . '][config]");
}
}
');
......
// load TS parser
$parser = t3lib_div::makeInstance('t3lib_TSparser');
$parser->parse($record[0][$this->P['field']]);
$data = $parser->setup['be_layout.'];
$data = $parser->setup['backend_layout.'];
$t3GridData = '[';
$colCount = $data['colCount'];
$rowCount = $data['rowCount'];
typo3/sysext/cms/classes/class.tx_cms_backendlayout.php (working copy)
for ($i = count($rootline); $i > 0; $i--) {
$page = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'uid, be_layout, be_layout_next_level',
'uid, backend_layout, backend_layout_next_level',
'pages',
'uid=' . intval($rootline[$i]['uid'])
);
if (intval($page['be_layout_next_level']) > 0 && $page['uid'] != $id) {
$backendLayoutUid = intval($page['be_layout_next_level']);
if (intval($page['backend_layout_next_level']) > 0 && $page['uid'] != $id) {
$backendLayoutUid = intval($page['backend_layout_next_level']);
break;
} else {
if (intval($page['be_layout']) > 0) {
$backendLayoutUid = intval($page['be_layout']);
if (intval($page['backend_layout']) > 0) {
$backendLayoutUid = intval($page['backend_layout']);
break;
}
}
......
if ($backendLayoutUid) {
$backendLayout = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'*',
'be_layouts',
'backend_layout',
'uid=' . $backendLayoutUid
);
......
$backendLayout['__colPosList'] = array();
// create items and colPosList
if ($backendLayout['__config']['be_layout.'] && $backendLayout['__config']['be_layout.']['rows.']) {
foreach ($backendLayout['__config']['be_layout.']['rows.'] as $row) {
if ($backendLayout['__config']['backend_layout.'] && $backendLayout['__config']['backend_layout.']['rows.']) {
foreach ($backendLayout['__config']['backend_layout.']['rows.'] as $row) {
if (isset($row['columns.']) && is_array($row['columns.'])) {
foreach ($row['columns.'] as $column) {
$backendLayout['__items'][] = array(
typo3/sysext/cms/locallang_tca.xml (working copy)
<label index="pages.fe_login_mode.enableAgain">Re-Enable login</label>
<label index="pages.storage_pid_formlabel">Page</label>
<label index="pages.TSconfig_formlabel">Page TSConfig</label>
<label index="pages.be_layout_formlabel">Backend Layout (this page only)</label>
<label index="pages.be_layout_next_level_formlabel">Backend Layout (subpages of this page)</label>
<label index="pages.be_layout.none">None</label>
<label index="pages.backend_layout_formlabel">Backend Layout (this page only)</label>
<label index="pages.backend_layout_next_level_formlabel">Backend Layout (subpages of this page)</label>
<label index="pages.backend_layout.none">None</label>
<label index="tt_content">Pagecontent</label>
<label index="fe_users">Website User</label>
<label index="fe_users.username">Username:</label>
......
<label index="sys_template.tabs.options">Options</label>
<label index="sys_template.tabs.access">Access</label>
<label index="pages_language_overlay">Alternative Page Language</label>
<label index="be_layouts">Backend Layouts</label>
<label index="be_layouts.title">Title</label>
<label index="be_layouts.description">Description</label>
<label index="be_layouts.config">Config</label>
<label index="be_layouts.wizard">Wizard</label>
<label index="be_layouts.icon">Icon</label>
<label index="backend_layout">Backend Layout</label>
<label index="backend_layout.title">Title</label>
<label index="backend_layout.description">Description</label>
<label index="backend_layout.config">Config</label>
<label index="backend_layout.wizard">Wizard</label>
<label index="backend_layout.icon">Icon</label>
</languageKey>
</data>
</T3locallang>
typo3/sysext/context_help/locallang_csh_pages.xml (working copy)
Of course, admins can make custom use of this field via their TypoScript templates.</label>
<label index="_abstract.seeAlso">pages:description</label>
<label index="be_layout.description">Select a backend layout for this particular page only.</label>
<label index="be_layout.details">If you have created any additional backend layouts you can select them here to have the page module render the columns of this page with the selected layout.
<label index="backend_layout.description">Select a backend layout for this particular page only.</label>
<label index="backend_layout.details">If you have created any additional backend layouts you can select them here to have the page module render the columns of this page with the selected layout.
Usually it will reflect the frontend layout in a way so that you will be able to recognize easily to which area of the page the content belongs.
......
The selection is &lt;b&gt;NOT&lt;/b&gt; inherited automatically by subpages - use &lt;b&gt;Backend Layout (subpages of this page)&lt;/b&gt; if you want to achieve this.
</label>
<label index="_be_layout.seeAlso">pages:be_layout_next_level</label>
<label index="be_layout_next_level.description">Select a backend layout for all subpages of this page.</label>
<label index="be_layout_next_level.details">If you have created any additional backend layouts you can select them here to have the page module render the columns of the subpages of this page with the selected layout.
<label index="_backend_layout.seeAlso">pages:backend_layout_next_level</label>
<label index="backend_layout_next_level.description">Select a backend layout for all subpages of this page.</label>
<label index="backend_layout_next_level.details">If you have created any additional backend layouts you can select them here to have the page module render the columns of the subpages of this page with the selected layout.
Usually it will reflect the frontend layout in a way so that you will be able to recognize easily to which area of the page the content belongs.
......
If you select a layout or "none", it will override any settings that might have been inherited from pages in the rootline of the current page.
The selection is inherited automatically by all subpages - so you don't have to set it seperately for each of them.</label>
<label index="_be_layout_next_level.seeAlso">pages:be_layout</label>
<label index="_backend_layout_next_level.seeAlso">pages:backend_layout</label>
<label index="newUntil.description">Enter the 'expiry date' of the page.</label>
<label index="newUntil.details">The 'expiry date' of the page has no effect on the display of the webpage. This value is rather for internal use meant as a reminder of the date when the content of this page should be revised. So if the content of the page will be outdated at a certain point in time, you could set this value to that approximate date.
In order to obtain an overview of the expiry dates of pages, use the 'Pagetree overview' in the 'Web&gt;Info' module.</label>
    (1-1/1)