module_invoke show notifications block only if node has comments
igorik - June 16, 2009 - 20:21
| Project: | Notifications |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Description
Hi!
I am not sure if it is a bug or I am doing something wrong.
I have this code inside my node.tpl.php
$new_node_block = module_invoke('notifications_ui', 'block', 'view', 0);
print $new_node_block['content'];but there is no block content shown, if node has no comments.
If the node has some comments (min. 1), the content of block is shown.
I am not sure about this behaviour, please can you explain it or fix it?
Thanks
Igorik
http://www.somvprahe.sk

#1
I am sorry, the previous text is confusing and bad.
The problem is only if i click on "add new comment" link on teaser.
the node is loaded with url like something this: some_site/comment/reply/31563#comment-form
in that mode (full node is shown with comment form) but node_invoke does not show a notification block.
sorry for confusing.
thanks
Igorik
#2
Check out the code for that block, you'll find out that it shows up only for node/* pages.
You want it on comment page? copy&paste the code from the module in your template or in another module's block