Trying to expose the 'metatags' field added to nodes from the Metatag module, which is accessible via node_load and RESTful simply says "The property metatags could not be found in node" even though it exposes just fine via Services or Contentasjson modules. Is there something special in RESTful I'm missing or is it purposely filtering that field?
Here's what I've done to expose the field (and I'm sure its completely wrong, but it works)
protected function publicFields() {
...
// Expose Metatags
$public_fields['metatags'] = array(
'property' => 'nid',
'process_callbacks' => array(
array($this, 'getMetatags'),
)
);
...
public function getMetatags($value) {
$node = node_load($value);
return $node->metatags[$node->language];
}
Trying to expose the 'metatags' field added to nodes from the Metatag module, which is accessible via node_load and RESTful simply says "The property metatags could not be found in node" even though it exposes just fine via Services or Contentasjson modules. Is there something special in RESTful I'm missing or is it purposely filtering that field?
Here's what I've done to expose the field (and I'm sure its completely wrong, but it works)
protected function publicFields() { ... // Expose Metatags $public_fields['metatags'] = array( 'property' => 'nid', 'process_callbacks' => array( array($this, 'getMetatags'), ) ); ...public function getMetatags($value) { $node = node_load($value); return $node->metatags[$node->language]; }