Forums / General / Testing whether a node is part of a subtree notification

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Testing whether a node is part of a subtree notification

Author Message

Paul Forsyth

Monday 31 May 2004 3:01:57 am

Im trying to test whether the current node is part of a subtree notification.

This test will allow me to show either 'add to notifications' or 'already added to notifications'.

I've dug around the code but the only place where this information seems to come out is with the display of handlers within the notifications/settings module/view. It would be pretty handy if this information could be queried directly by templates.

I see that the ez.no and admin notification button never changes state either - its always there.

Have i missed something?

paul

--
http://www.visionwt.com

Paul Forsyth

Monday 31 May 2004 6:25:38 am

Ah, i think this does it:

{let handler_list=fetch( 'notification', 'handler_list' )}
  {section var=handler loop=$handler_list}
    {section show=eq($handler.id_string, "ezsubtree")}
       {$handler.subscribed_nodes|attribute(show)}
    {/section}
  {section}
{/let}      

and you need a proper user for it to show, not an anonymous user...

paul

--
http://www.visionwt.com