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.

eZ debug

Timing: Jan 19 2025 01:06:07
Script start
Timing: Jan 19 2025 01:06:07
Module start 'layout'
Timing: Jan 19 2025 01:06:07
Module start 'content'
Timing: Jan 19 2025 01:06:08
Module end 'content'
Timing: Jan 19 2025 01:06:08
Script end

Main resources:

Total runtime0.7290 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 590.5234152.6563
Module start 'layout' 0.00750.0042 743.179739.4922
Module start 'content' 0.01170.7157 782.6719427.2188
Module end 'content' 0.72740.0015 1,209.89068.1094
Script end 0.7289  1,218.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.5236160.0002
Check MTime0.00140.1880160.0001
Mysql Total
Database connection0.00160.216310.0016
Mysqli_queries0.679693.2206520.0131
Looping result0.00070.1020500.0000
Template Total0.688094.420.3440
Template load0.00250.338620.0012
Template processing0.685694.043720.3428
Template load and register function0.00020.030710.0002
states
state_id_array0.00110.146510.0011
state_identifier_array0.00120.166520.0006
Override
Cache load0.00180.2490180.0001
Sytem overhead
Fetch class attribute can translate value0.00110.148710.0011
Fetch class attribute name0.00140.188220.0007
XML
Image XML parsing0.00010.012510.0001
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00070.1006100.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs