Forums / Developer / Assign an XML Text Field to a Variable

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