mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT: Added page location fields in the behaviour tab, as an alternative to drag and drop
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@75814 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2387bbcbc1
commit
98f7d9b644
@ -1214,6 +1214,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$this->fieldLabel('ClassName'),
|
$this->fieldLabel('ClassName'),
|
||||||
$this->getClassDropdown()
|
$this->getClassDropdown()
|
||||||
),
|
),
|
||||||
|
|
||||||
|
new OptionsetField("ParentType", "Page location", array(
|
||||||
|
"root" => _t("SiteTree.PARENTTYPE_ROOT", "Top-level page"),
|
||||||
|
"subpage" => _t("SiteTree.PARENTTYPE_SUBPAGE", "Sub-page underneath a parent page (choose below)"),
|
||||||
|
)),
|
||||||
|
new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), 'SiteTree'),
|
||||||
|
|
||||||
new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')),
|
new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')),
|
||||||
new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch')),
|
new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch')),
|
||||||
/*, new TreeMultiselectField("MultipleParents", "Page appears within", "SiteTree")*/
|
/*, new TreeMultiselectField("MultipleParents", "Page appears within", "SiteTree")*/
|
||||||
@ -1310,6 +1317,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$labels['MetaKeywords'] = _t('SiteTree.METAKEYWORDS', "Keywords");
|
$labels['MetaKeywords'] = _t('SiteTree.METAKEYWORDS', "Keywords");
|
||||||
$labels['ExtraMeta'] = _t('SiteTree.METAEXTRA', "Custom Meta Tags");
|
$labels['ExtraMeta'] = _t('SiteTree.METAEXTRA', "Custom Meta Tags");
|
||||||
$labels['ClassName'] = _t('SiteTree.PAGETYPE', "Page type", PR_MEDIUM, 'Classname of a page object');
|
$labels['ClassName'] = _t('SiteTree.PAGETYPE', "Page type", PR_MEDIUM, 'Classname of a page object');
|
||||||
|
$labels['ParentType'] = _t('SiteTree.PARENTTYPE', "Page location", PR_MEDIUM);
|
||||||
|
$labels['ParentID'] = _t('SiteTree.PARENTID', "Parent page", PR_MEDIUM);
|
||||||
$labels['ShowInMenus'] =_t('SiteTree.SHOWINMENUS', "Show in menus?");
|
$labels['ShowInMenus'] =_t('SiteTree.SHOWINMENUS', "Show in menus?");
|
||||||
$labels['ShowInSearch'] = _t('SiteTree.SHOWINSEARCH', "Show in search?");
|
$labels['ShowInSearch'] = _t('SiteTree.SHOWINSEARCH', "Show in search?");
|
||||||
$labels['ProvideComments'] = _t('SiteTree.ALLOWCOMMENTS', "Allow comments on this page?");
|
$labels['ProvideComments'] = _t('SiteTree.ALLOWCOMMENTS', "Allow comments on this page?");
|
||||||
@ -1879,5 +1888,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getParentType() {
|
||||||
|
return $this->ParentID == 0 ? 'root' : 'subpage';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user