mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Moved LandingPageFreshness to "Settings" tab
It just adds clutter under the main tab, and pushes the actually important "Content" field further down the CMS screen
This commit is contained in:
parent
899a81cb79
commit
92b6de1d77
@ -106,7 +106,23 @@ class BlogTree extends Page {
|
|||||||
function getCMSFields() {
|
function getCMSFields() {
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
$fields->addFieldToTab('Root.Main', new DropdownField('LandingPageFreshness', 'When you first open the blog, how many entries should I show', array(
|
if(class_exists('WidgetArea')) {
|
||||||
|
$fields->addFieldToTab("Root.Widgets", new CheckboxField("InheritSideBar", 'Inherit Sidebar From Parent'));
|
||||||
|
$fields->addFieldToTab("Root.Widgets", new WidgetAreaEditor("SideBar"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSettingsFields() {
|
||||||
|
$fields = parent::getSettingsFields();
|
||||||
|
|
||||||
|
$fields->addFieldToTab(
|
||||||
|
'Root.Settings',
|
||||||
|
new DropdownField(
|
||||||
|
'LandingPageFreshness',
|
||||||
|
'When you first open the blog, how many entries should I show',
|
||||||
|
array(
|
||||||
"" => "All entries",
|
"" => "All entries",
|
||||||
"1" => "Last month's entries",
|
"1" => "Last month's entries",
|
||||||
"2" => "Last 2 months' entries",
|
"2" => "Last 2 months' entries",
|
||||||
@ -121,12 +137,9 @@ class BlogTree extends Page {
|
|||||||
"11" => "Last 11 months' entries",
|
"11" => "Last 11 months' entries",
|
||||||
"12" => "Last year's entries",
|
"12" => "Last year's entries",
|
||||||
"INHERIT" => "Take value from parent Blog Tree"
|
"INHERIT" => "Take value from parent Blog Tree"
|
||||||
)), "Content");
|
)
|
||||||
if(class_exists('WidgetArea')) {
|
)
|
||||||
$fields->addFieldToTab("Root.Widgets", new CheckboxField("InheritSideBar", 'Inherit Sidebar From Parent'));
|
);
|
||||||
$fields->addFieldToTab("Root.Widgets", new WidgetAreaEditor("SideBar"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user