Notifications Digest email formatting

Author Message

Ritu Sharma

Thursday 05 March 2009 7:33:05 am

Hi

I have just implemented the notifications and realized the format of the notifications digest email is not very readable.

The digest is a collection of plain full text updations for the new nodes. I read in one of the forums that I need to modify for the templates plain.tpl, digest_plain.tpl and digest_plain. (not clear if I can do overrides)

I was wondering what commands can I use to put a user-friendly format that consists of the following info:
a) The node title that was modified & modification date
b) Link to the node

Regards

Ritu

Ritu Sharma

Thursday 05 March 2009 11:23:36 am

I was able to figure out a solution and adding it here if it can help somebody else.

Here is what I did:
1) Added the following to settings/siteaccess/eng/site.ini.append.php
[MailSettings]
ContentType=text/html

2) Added the following override to extension/ezwebin/design/ezwebin/override/templates/digest_element_plain.tpl

{*?template charset=utf-8?*}
{let content_object_version=fetch(notification,event_content,hash(event_id,$collection_item.event_id))}

{*display Title *}
<p> {$content_object_version.contentobject.name} <br>

{* display author *}
Added/ Update by: {$content_object_version.creator.name} <br>

{* display link*}

Location:
{let object_URL= concat("http://",ezini("SiteSettings","SiteURL"),"content/view/full/",$content_object_version.contentobject.main_node_id) |ezurl(no)}
<a href ={object_URL}>{object_URL}</a>
<br>
</p>
<br>

Jean-Yves Zinsou

Thursday 05 March 2009 11:50:00 am

Thanks,
that was a tricky one ...

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

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:07:09
Script start
Timing: Jan 19 2025 01:07:09
Module start 'layout'
Timing: Jan 19 2025 01:07:09
Module start 'content'
Timing: Jan 19 2025 01:07:10
Module end 'content'
Timing: Jan 19 2025 01:07:10
Script end

Main resources:

Total runtime1.0866 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.2734152.6406
Module start 'layout' 0.00660.0037 741.914139.4766
Module start 'content' 0.01031.0750 781.3906537.9375
Module end 'content' 1.08530.0012 1,319.328112.1406
Script end 1.0866  1,331.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3467160.0002
Check MTime0.00140.1283160.0001
Mysql Total
Database connection0.00090.083010.0009
Mysqli_queries1.031794.9470570.0181
Looping result0.00050.0478550.0000
Template Total1.051796.820.5258
Template load0.00170.159120.0009
Template processing1.049996.622420.5250
Template load and register function0.00020.021610.0002
states
state_id_array0.00160.148510.0016
state_identifier_array0.00160.144820.0008
Override
Cache load0.00150.1358350.0000
Sytem overhead
Fetch class attribute can translate value0.00060.055120.0003
Fetch class attribute name0.00090.084940.0002
XML
Image XML parsing0.00070.066420.0004
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00130.1163160.0001
String conversion0.00000.001040.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs