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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.