Hi there,
Iam new in SilverStripe and i have problem. I have DataObject called Property with relation defined like this :
static $has_many = array(
'Attributes' => 'PropertyAttributes'
);
public function PropertyAttributes() {
$attributes = $this->Attributes();
$map = new SS_Map($attributes, "name", "value");
return $map;
}
One property have many attributes stored in DB in name value pairs. I want acces them in template with their name. When i try acces attributes in template $PropertyAttributes.title i am getting this warning
[Warning] call_user_func_array() expects parameter 1 to be a valid callback, class 'SS_Map' does not have a method 'XML_val'
How can i access these attributes in template on each property with their name ?