converting XML Block to Text Block

Author Message

André R.

Tuesday 16 May 2006 5:54:00 am

How do I convert xml blocs to text block?

Like if I wanted to convert the article into to plain text..

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Felix Laate

Tuesday 16 May 2006 6:06:32 am

Hi André!

You could use <i>strip_tags</i>. But you need to set it up first in the [php]-block of template.ini:

[PHP]
PHPOperatorList[striptags]=strip_tags

Then use it in templates like this:

{$node.data_map._ATTRIBUTE_NAME_.content.output.output_text|striptags()}

Hope this will help you!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Xavier Dutoit

Tuesday 16 May 2006 6:36:09 am

Hi,

You are obvioulsy going to loose the new lines (as it strips <p> tags too). I haven't find a better solution, but if you find something, please share.

X+

http://www.sydesy.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.