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

Custom text in button for DataObjectManager items


Go to End
Reply


3 Posts   586 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, 4096 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!