Assign an XML Text Field to a Variable

Author Message

Alex Jones

Friday 18 July 2003 10:28:12 am

I'm sure this is simple, but I just can't seem to find an answer to this question: How can I set
{attribute_view_gui attribute=$content_version.data_map.description}

to be the value of a variable?

I am attempting to implement the Glossary operator (http://ez.no/developer/ez_publish_3/contributions/glossary_operator) which is great, but I cannot seem to set it up to read the contents of the body of the page which is stored in an XML text field.

Thanks,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Alex Jones

Friday 18 July 2003 11:45:58 am

Nevermind, I realized I could grab the field by using
$content_version.data_map.description.data_text

FYI 'description' is the name of the XML text field.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Bård Farstad

Friday 18 July 2003 12:11:52 pm

You can also get the rendered XML using:
{$content_version.data_map.description.content.output.output_text}

The data_text attribute contains the RAW XML data, before it's rendered by the template engine.

--bård

Documentation: http://ez.no/doc

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 18 2025 18:35:28
Script start
Timing: Jan 18 2025 18:35:28
Module start 'layout'
Timing: Jan 18 2025 18:35:28
Module start 'content'
Timing: Jan 18 2025 18:35:29
Module end 'content'
Timing: Jan 18 2025 18:35:29
Script end

Main resources:

Total runtime0.6324 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.0057 588.0313152.6406
Module start 'layout' 0.00570.0030 740.671939.4609
Module start 'content' 0.00870.6222 780.1328538.8438
Module end 'content' 0.63090.0014 1,318.976612.1563
Script end 0.6323  1,331.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4892160.0002
Check MTime0.00130.2070160.0001
Mysql Total
Database connection0.00070.103810.0007
Mysqli_queries0.585892.6304570.0103
Looping result0.00050.0811550.0000
Template Total0.604295.520.3021
Template load0.00210.326720.0010
Template processing0.602195.215320.3011
Template load and register function0.00010.012610.0001
states
state_id_array0.00130.202610.0013
state_identifier_array0.00110.177120.0006
Override
Cache load0.00170.2711210.0001
Sytem overhead
Fetch class attribute can translate value0.00070.116520.0004
Fetch class attribute name0.00160.252750.0003
XML
Image XML parsing0.00080.125420.0004
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00090.1363230.0000
String conversion0.00000.001340.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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs