override forum reply

Author Message

riccardo refolo

Monday 07 February 2005 7:38:43 am

I altered Forum Replay Class, I added a field to add a file.
It's all right if i look directly just the forum reply but looking a Forum_topic with all the relatives replay, It's not visible the file.

I added this code in forum_replay.tpl:

{section show=$node.object.data_map.description.content.is_empty|not}
<div class="attribute-long">
{attribute_view_gui attribute=$node.object.data_map.description}
</div>
<div class="attribute-file">
<p>{attribute_view_gui attribute=$node.object.data_map.file icon_title=$node.name}</p>
</div>
{/section}

Have I to do others alteration to code?

 

Kristian Hole

Monday 07 February 2005 11:10:25 am

Out of the top of my head i would try something like:

{section show=$node.object.data_map.description.content.is_empty|not}
<div class="attribute-long">
{attribute_view_gui attribute=$node.object.data_map.description}
</div>
{/section}
{section show=$node.object.data_map.file.content}
<div class="attribute-file">
<p>{attribute_view_gui attribute=$node.object.data_map.file icon_title=$node.name}</p>
</div>
{/section}

The {section show=..} works like a if statement, showing everything within {section show=condition} and {/section} if the condition is true.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

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 04:37:22
Script start
Timing: Jan 19 2025 04:37:22
Module start 'layout'
Timing: Jan 19 2025 04:37:22
Module start 'content'
Timing: Jan 19 2025 04:37:23
Module end 'content'
Timing: Jan 19 2025 04:37:23
Script end

Main resources:

Total runtime0.8596 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.1484152.6250
Module start 'layout' 0.00530.0026 741.773439.4453
Module start 'content' 0.00780.8502 781.2188523.8281
Module end 'content' 0.85800.0015 1,305.04698.1719
Script end 0.8595  1,313.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3821160.0002
Check MTime0.00140.1594160.0001
Mysql Total
Database connection0.00100.115910.0010
Mysqli_queries0.815594.8678540.0151
Looping result0.00050.0583520.0000
Template Total0.831196.720.4155
Template load0.00240.274720.0012
Template processing0.828796.404320.4143
Template load and register function0.00050.061710.0005
states
state_id_array0.00100.121010.0010
state_identifier_array0.00080.098420.0004
Override
Cache load0.00210.2435210.0001
Sytem overhead
Fetch class attribute can translate value0.00050.062620.0003
Fetch class attribute name0.00140.162930.0005
XML
Image XML parsing0.00060.068720.0003
class_abstraction
Instantiating content class attribute0.00000.001230.0000
General
dbfile0.00070.0813160.0000
String conversion0.00000.000940.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
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 7

Time used to render debug report: 0.0002 secs