Hi all!

I'd like to know if it is possible to display a link on a node-custom.tpl.php so users can subscribe directly from the custom node page.

A direct link (without the confirmation page) would actually be perfect !

I wonder if it is possible. May be by creating a notifications.tpl.php or something like that

Thanks for your help !

Comments

vantuykom’s picture

I'm looking for the same functionality, just a link that automatically subscribes to the node...

fehin’s picture

Same here.

savedario’s picture

Version: 6.x-2.1 » 6.x-2.3
Status: Active » Needs review

Posting here a slightly different approach in case it helps someone.
I post in this issue as it is the only one I've found with a problem similar to mine.

I wanted to manipulate my node-.tpl.php to show CCK fields, and standard ones, according to some complex rules.
I could not show the notification form as I wanted because, by the time it gets to the template, the HTML for that part has already being appended to the main node's body (it's rendered version).
I changed notifications_ui.module at line 404 from:

      $node->body .= drupal_get_form('notifications_ui_options_form_'.$form_instance_id, $options, TRUE, TRUE);

to:

      $node->content['notifications']['#value'] = drupal_get_form('notifications_ui_options_form_'.$form_instance_id, $options, TRUE, TRUE);
      $node->body .= $node->content['notifications']['#value'];

Please note the version change. This is for 6.x-2.3
This way the notification form is available as $node->content['notifications']['#value'] in the template file.

Sorry, but I still have not managed to generate correct patches.

savedario’s picture

Oh... and I think this may be interesting for your specific problem:
http://groups.drupal.org/node/17779