Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By zilla on
i'm using the watcher module and would like to place the watcher action into a block (the ajaxified "watch this" "stop watching this" button)
i tried to paste this update to some old code into a block and it ain't working - any ideas? missing something for rendered output? i have no idea...
should it be making use of:
print drupal_render($node['field_name']);
here's what i have in there right now with the error on 3, and "watcher" is the field name
<?php
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_view(node_load(arg(1));
print $node->watcher[$node->language][0]['value'];
}
?>