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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Custom Site Config: HasManyComplexTableField


2 Posts   1690 Views


12 July 2010 at 8:49am Community Member, 16 Posts

How can I use HasManyComplexTableField with a Custom Site Config?

My code returns an error: "Can't figure out the data class of"


class CustomSiteConfig extends Extension {

   function extraStatics() {
      return array(
         'db' => array(
            'Link' => 'Text',
            'Text' => 'Text'
         'has_many' => array(
            'Links' => 'Link'

   public function updateCMSFields(FieldSet $fields) {
      $tablefield = new HasManyComplexTableField (
            'Link' => 'Link',
            'Text' => 'Link Text'
      $fields->addFieldToTab( 'Root.Content.Links', $tablefield );
      return $fields;



12 July 2010 at 9:56pm Community Member, 271 Posts

Maybe this helps: