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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Custom text in button for DataObjectManager items


Go to End


3 Posts   766 Views

Avatar
DeklinKelly

Community Member, 197 Posts

3 December 2010 at 2:35am

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

Forum Moderator, 4102 Posts

3 December 2010 at 3:50am

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

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

Avatar
DeklinKelly

Community Member, 197 Posts

3 December 2010 at 4:23am

Thanks!