-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX Update CMS fields now that they're being scaffolded #589
FIX Update CMS fields now that they're being scaffolded #589
Conversation
$fields->addFieldToTab( | ||
'Root.Main', | ||
TextField::create( | ||
'CustomMetaTitle', | ||
$this->fieldLabel('CustomMetaTitle') | ||
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')), | ||
'MetaTitle' | ||
); | ||
$fields->addFieldToTab( | ||
'Root.Main', | ||
TextareaField::create( | ||
'CustomMetaKeywords', | ||
$this->fieldLabel('CustomMetaKeywords') | ||
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')), | ||
'MetaKeywords' | ||
); | ||
$fields->addFieldToTab( | ||
'Root.Main', | ||
TextareaField::create( | ||
'CustomMetaDescription', | ||
$this->fieldLabel('CustomMetaDescription') | ||
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')), | ||
'MetaDescription' | ||
); | ||
$fields->addFieldToTab( | ||
'Root.Main', | ||
TextField::create( | ||
'CustomExtraMeta', | ||
$this->fieldLabel('CustomExtraMeta') | ||
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')), | ||
'ExtraMeta' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the relevant ones to VirtualPage
(see silverstripe/silverstripe-cms#2983)
Removed CustomMetaTitle
and CustomMetaKeywords
because the fields they're intended to override were long-since removed from SiteTree
.
$pageSelectionField = SubsitesTreeDropdownField::create( | ||
'CopyContentFromID', | ||
_t('SilverStripe\\CMS\\Model\\VirtualPage.CHOOSE', 'Linked Page'), | ||
SiteTree::class, | ||
'ID', | ||
'MenuTitle' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is moved to the top which is right next to the subsite selector field and matches where it sits in the normal virtual page.
467ccb8
to
16b890f
Compare
CI failures should go green when other PRs are merged (see kitchen sink CI run) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have merged other PRs and re-run CI, there are failures
Fingers crossed it just needs a rebase. |
16b890f
to
21ad49a
Compare
Relies on changes to
SiteTree
andVirtualPage
in silverstripe/silverstripe-cms#2983Issue