Forums / Setup & design / override forum reply

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