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 eZ publish 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/

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 00:33:02
Script start
Timing: Jan 19 2025 00:33:02
Module start 'layout'
Timing: Jan 19 2025 00:33:02
Module start 'content'
Timing: Jan 19 2025 00:33:03
Module end 'content'
Timing: Jan 19 2025 00:33:03
Script end

Main resources:

Total runtime1.0683 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.0155 588.0469152.6406
Module start 'layout' 0.01550.0033 740.687539.4766
Module start 'content' 0.01891.0479 780.1641542.3828
Module end 'content' 1.06680.0015 1,322.546912.1250
Script end 1.0683  1,334.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3016160.0002
Check MTime0.00130.1250160.0001
Mysql Total
Database connection0.00060.054310.0006
Mysqli_queries1.018395.3246570.0179
Looping result0.00070.0629550.0000
Template Total1.024895.920.5124
Template load0.00220.201620.0011
Template processing1.022795.729420.5113
Template load and register function0.00010.009910.0001
states
state_id_array0.00110.102610.0011
state_identifier_array0.00130.124620.0007
Override
Cache load0.00180.1669250.0001
Sytem overhead
Fetch class attribute can translate value0.00080.072620.0004
Fetch class attribute name0.00140.127750.0003
XML
Image XML parsing0.00100.093620.0005
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00100.0902230.0000
String conversion0.00000.000840.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs