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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   853 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!