Hi guys, I've downloaded the latest TagField module code and did a dev/build. Added the Tag class
<Tag.php>
class Tag extends DataObject {
static $db = array(
'Title' => 'Varchar(200)',
);
static $belongs_many_many = array(
'Articles' => 'Article'
);
}
and incorporated the relation into my Article class...
<Article.php>
...
static $many_many = array(
'RelationTags' => 'Tag'
);
...
$tagField = new TagField('RelationTags');
The field is the added accordingly to the fieldset. The Articles are managed via a DOM in a Category class, as follows:
<Category.php>
public function getCMSFields()
{
$f = parent::getCMSFields();
$articleManager = new DataObjectManager(
$this, // Controller
'Articles', // Source name
'Article', // Source class
array(
'isPublished' => 'Published',
'isFeatured' => 'Featured',
'Title' => 'Title',
'AuthorName' => 'Author',
'Created' => 'Created',
'LastEdited' => 'LastEdited',
), // Headings
'getCMSFields', // Detail fields (function name or FieldSet object)
'', // Filter clause
'' // Sort clause
// Join clause
);
The field does appear in the popup, saves the info, but there is no interactivity on the field. Am I missing something? Feels like the javascripts/jqueries etc are not even loading.
Thanks!