mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
added $name to constructor (can't derive a valid ID from the title, as it might not contain alphanumeric characters - had problems with chinese translation)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44256 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a09369d605
commit
5b7139c874
@ -1009,7 +1009,9 @@ class SiteTree extends DataObject {
|
||||
new TextField("MetaTitle", _t('SiteTree.METATITLE', "Title")),
|
||||
new TextareaField("MetaDescription", _t('SiteTree.METADESC', "Description")),
|
||||
new TextareaField("MetaKeywords", _t('SiteTree.METAKEYWORDS', "Keywords")),
|
||||
new ToggleCompositeField(_t('SiteTree.METAADVANCEDHEADER', "Advanced Options..."),
|
||||
new ToggleCompositeField(
|
||||
'AdvancedOptions',
|
||||
_t('SiteTree.METAADVANCEDHEADER', "Advanced Options..."),
|
||||
array(
|
||||
new TextareaField("ExtraMeta",_t('SiteTree.METAEXTRA', "Custom Meta Tags")),
|
||||
new LiteralField(
|
||||
|
@ -9,9 +9,9 @@ class ToggleCompositeField extends CompositeField {
|
||||
*/
|
||||
public $headingLevel = 2;
|
||||
|
||||
function __construct($title, $children) {
|
||||
function __construct($name, $title, $children) {
|
||||
$this->name = $name;
|
||||
$this->title = $title;
|
||||
$this->name = ereg_replace('[^A-Za-z0-9]','',$this->title);
|
||||
|
||||
$this->startClosed(true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user