Forums / Developer / Template code generating XHTML head element

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Template code generating XHTML head element

Author Message

Eirik Alfstad Johansen

Thursday 23 October 2003 1:54:55 am

Hi,

I'm using the following template code in a forum line view override:

{default node_name=$node.name posts=fetch(content, list_count, hash(parent_node_id, $node.node_id, class_filter_type, include, class_filter_array, array(7)) )}<a href={concat('content/view/full/',$node.node_id)|ezurl}>{$node_name|wash}</a> ({$posts} innlegg){/default}<br />
{$node.data_map.description.data_text}<br /><br />

However, for some strange reason, the variable $node.data_map.description.data_text produces the following output in addition to the description text:

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<paragraph>[[DESCRIPTION]]</paragraph>
</section>

This causes, among other things, an error in my code because of several XML top elements.

Any idea why the variable is generating such code?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Bård Farstad

Thursday 23 October 2003 2:00:08 am

You're fetching the raw XML data. If you would like to fetch the rendered XHTML text you need to ask for this by using the {$attribute.content.output.output_text} instead of fetching data_text directly.

If you don't want to have formatting (xml) you can use the text datatype in Exponential which stores plaintext.

--bård

Documentation: http://ez.no/doc

Eirik Alfstad Johansen

Friday 24 October 2003 3:06:52 am

Thanks for the tip, Bård !

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/