Skip to content

Commit

Permalink
Toggle metadata fields in SiteTree->getCMSFields()
Browse files Browse the repository at this point in the history
To save space, reduce clutter and deemphasize the fields.
Partially fixes #7405, needs better design though.
  • Loading branch information
chillu committed Jul 15, 2012
1 parent 3ff0c42 commit 69e4fa0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions code/model/SiteTree.php
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -2730,4 +2734,4 @@ static function on_db_reset() {
self::$cache_permissions = array();
}

}
}

0 comments on commit 69e4fa0

Please sign in to comment.