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

DataObjectManager: Specify Sort in Admin Area


Go to End


886 Views

Avatar
DeklinKelly

Community Member, 197 Posts

4 January 2012 at 3:09pm

How can I get this to sort by "Food Name"?

      $obj = new SiteConfig_DataObjectManager( 
         $this->owner, 
         'Food', 
         'Food', 
         array('Plant'=>'Plant','FoodName'=>'Food Name'),
         'getCMSFields_forPopup'          
      ); 
      $obj->setSourceID($this->owner->ID);
      $obj->setAddTitle("Food Pages");
      $fields->addFieldToTab("Root.Content.Custom", $obj);