Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Toggle metadata fields in SiteTree->getCMSFields()

To save space, reduce clutter and deemphasize the fields.
Partially fixes #7405, needs better design though.
  • Loading branch information...
commit 69e4fa072a11e5eafcd4e03cfa9776bffd0ad3e1 1 parent 3ff0c42
Ingo Schommer chillu authored
Showing with 10 additions and 6 deletions.
  1. +10 −6 code/model/SiteTree.php
16 code/model/SiteTree.php
View
@@ -366,7 +366,7 @@ public static function page_type_classes() {
}
/**
- * Replace a "[sitetree_link,id=n]" shortcode with a link to the page with the corresponding ID.
+ * Replace a "[sitetree_link id=n]" shortcode with a link to the page with the corresponding ID.
*
* @return string
*/
@@ -1854,10 +1854,14 @@ function getCMSFields() {
$urlsegment,
new TextField("MenuTitle", $this->fieldLabel('MenuTitle')),
$htmlField = new HtmlEditorField("Content", _t('SiteTree.HTMLEDITORTITLE', "Content", 'HTML editor title')),
- new TextField("MetaTitle", $this->fieldLabel('MetaTitle')),
- new TextareaField("MetaKeywords", $this->fieldLabel('MetaKeywords'), 1),
- new TextareaField("MetaDescription", $this->fieldLabel('MetaDescription')),
- new TextareaField("ExtraMeta",$this->fieldLabel('ExtraMeta'))
+ ToggleCompositeField::create('Metadata', _t('SiteTree.MetadataToggle', 'Metadata'),
+ array(
+ new TextField("MetaTitle", $this->fieldLabel('MetaTitle')),
+ new TextareaField("MetaKeywords", $this->fieldLabel('MetaKeywords'), 1),
+ new TextareaField("MetaDescription", $this->fieldLabel('MetaDescription')),
+ new TextareaField("ExtraMeta",$this->fieldLabel('ExtraMeta'))
+ )
+ )->setHeadingLevel(4)
),
$tabDependent = new Tab('Dependent',
$dependentNote,
@@ -2730,4 +2734,4 @@ static function on_db_reset() {
self::$cache_permissions = array();
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.