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 /

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

Related content - has_many relationship of same pagetype

Go to End



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.