Is it possible to place the watcher link in a block? I tried this but it didn't work:

if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
print $node->content['watcher']['#value'];
}

Comments

solipsist’s picture

Try this:

<?php
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    $node = node_load(arg(1));
    $node = node_build_content($node, false, true);
    print $node->content['watcher']['#value'];
  }
?>
Toxid’s picture

Status: Active » Fixed

Perfect! Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

itserich’s picture

Version: 6.x-1.3 » 6.x-1.4

Thanks, this works for me. Want to add some details to help others.

Go to: site/admin/build/block/add

Input Format: PHP Code

Copy and Paste the code in #1.

Works, thanks. Upgdating version to show works in 1.4

artbussy’s picture

Great!
Also works in a custom field in Display Suite.

blogook’s picture

How would this work for D7 and Watcher 7 ? :-)

I tried the code in #1 but doesnt work in d7 ..

zilla’s picture

bump - also looking for tweak to make to run in D7

nwom’s picture