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.

Data Model Questions /

Related content - has_many relationship of same pagetype


Reply


1027 Views

Avatar
obj63mc

Community Member, 25 Posts

5 January 2010 at 8:42am

Hi All,

I am setting up a site that has categories, sub categories, and then articles. What I want to do is create a way for admins to select other articles on the site to be "related articles". When I tried to do so with a has many relationship -

static $has_many = array('RelatedArticles' => 'ArticlePage');

I then setup - a HasManyComplexTableField -

$tablefield = new HasManyComplexTableField( $this, 'RelatedArticles',    'ArticlePage',    array('Title' => 'Title' ), 'getCMSFields_forPopup'    );

$fields->addFieldToTab('Root.Content.RelatedArticles', $tablefield);

When I do this though on the admin side all checkboxes are disabled.

Does anyone know how to resolve this so that the check boxes will then be enabled.