Okay...solved it myself with some better forum searches and rewriting it slightly differently:
Article.php (Video.php is same but with Video replacing Article obviously)
<?php
class Article extends Page {
static $db = array(
'Author' => 'Text'
);
static $many_many = array(
'Topics' => 'Topic'
);
static $allowed_children = 'none';
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
$topicsTablefield = new ManyManyComplexTableField(
$this,
'Topics',
'Topic',
array(
'TopicName' => 'Topics'
),
'getCMSFields_forPopup'
);
$topicsTablefield->setAddTitle( 'A Topic' );
$fields->addFieldToTab( 'Root.Content.Topics', $topicsTablefield );
return $fields;
}
}
class Article_Controller extends Page_Controller {
}
?>
Topic.php
<?php
class Topic extends DataObject {
static $db = array(
'TopicName' => 'Text'
);
static $belongs_many_many = array(
'Articles' => 'Article'
);
function getCMSFields_forPopup() {
$fields = new FieldSet();
$fields->push( new TextField( 'TopicName', 'Topic' ) );
return $fields;
}
}
Hope providing this code helps someone else,
Patrick