Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Custom text in button for DataObjectManager items


Reply

3 Posts   519 Views

Avatar
DeklinKelly

3 December 2010 at 2:35am Community Member, 197 Posts

In the administrative area, there is a button that says: "Add Social Site" but I want it to say: "Add a Link for a Social Networking Site"

public function updateCMSFields(FieldSet &$fields) {

$m->setSourceID($this->owner->ID);
$fields->addFieldToTab("Root.FooterMenu", $m);

$m = new SiteConfig_DataObjectManager(
$this->owner,
'SocialSite',
'SocialSite',
array('Link'=>'Link', 'Text'=>'Text', ),
'getCMSFields_forPopup'
);

$m->setSourceID($this->owner->ID);
$fields->addFieldToTab("Root.SocialMenu", $m);

}

Avatar
UncleCheese

3 December 2010 at 3:50am 4085 Posts

$m->setAddTitle("a Link for a Social Networking Site");

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
DeklinKelly

3 December 2010 at 4:23am Community Member, 197 Posts

Thanks!