Forums / Setup & design / "Text block" VS "XML block" in forum_topic.tpl

"Text block" VS "XML block" in forum_topic.tpl

Author Message

Pascal France

Tuesday 15 August 2006 7:23:55 am

Hi,

I would like to use XML bloc attribute instead of the default Text block attribute in forum_topic class because I want to use FCKeditor.
But then, the override template design/base/override/templates/full/forum.tpl doesn't display any more the content of the "message" attribute.

It is this line:

133 {$node.object.data_map.message.content|simpletags|wordtoimage|autolink}

which displays the message.

Is there a way to display the content of an XML block in this template ?

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Marcin Drozd

Tuesday 15 August 2006 8:48:18 am

Hi
I think, try with:
$node.object.data_map.message.content.output.output_text
or
$node.object.data_map.message.content.output.output_xml
(I'm don't remember)

http://ez-publish.pl

Pascal France

Tuesday 15 August 2006 10:38:25 am

Hi Marcin,

<i>$node.object.data_map.message.content.output.output_text</i> works "a little" ;-)

I have tried many other syntaxes but no one works.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Kristof Coomans

Tuesday 15 August 2006 1:39:21 pm

Hello Pascal

Use {attribute_view_gui attribute=$node.object.data_map.message} or take a look at the code used in design/standard/templates/content/datatype/view/ezxmltext.tpl.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Pascal France

Wednesday 16 August 2006 2:01:18 am

Hi Kristof,

Of course !! It was too easy ;-)

I would like to know if there is an easy way to enable these tags:

<b></b>
<i></i>
<u></u>

in the template forum_reply_edit.tpl (if I use a Text Block attribute) ?

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Marcin Drozd

Wednesday 16 August 2006 2:22:14 am

Hi
add to template.ini

[SimpleTagsOperator]
TagList[]
TagList[b]=<b>;</b>;htmlspecialchars,nl2br
TagList[i]=<i>;</i>;htmlspecialchars,nl2br

it works for me in the 3.7.

http://ez-publish.pl

Pascal France

Wednesday 16 August 2006 3:27:30 am

Hi Marcin,

Thanks a lot !

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish