In one of my Plugin's CP templates I am using a element select field to grab elements from a custom element type. This field saves an array of element ids to a specific record's attribute called "location". How do you return an element criteria model instead of the array of ids when the model attribute is called via twig?
// Model
protected function defineAttributes()
{
return array_merge(parent::defineAttributes(), array(
'location' => Attributetype::Mixed,
'specificLocation' => AttributeType::String,
'registration' => AttributeType::Mixed,
));
}
// Front end template
{{ craft.pluginname.variable.location }}