Forums / Developer / Is is possible to output content of xml block as text

"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".

Is is possible to output content of xml block as text

Author Message

Jose Mourinho

Wednesday 12 September 2007 10:54:45 am

Hello all

How can the content of xml block to be output as text? I want to extract the attribute of object which is an xml block and output it in title of html tag a
(in <a title="here I want to put the content of the xml bock" href="http://www.blabla.com"> link</a>)
Is there someway with raw output ... ?

10x to all

paul bolger

Wednesday 12 September 2007 4:15:50 pm

Hi Jose

You certainly can. But be aware that without stripping the XML tags you may end up with a pretty dirty title.

Try something like this.

{strip_tags( $node.data_map.intro.value.output.output_text ) | wash | shorten(80, '...', right)}

Paul Bolger

Damien Pobel

Thursday 13 September 2007 1:03:20 am

Hi Jose,

Some informations about this question : http://ez.no/community/forum/setup_design/getting_text_version_of_an_xml_blocks (my first post in this forum ;-))

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Fox Mulder

Thursday 13 September 2007 2:12:51 am

In my case I solve the problem with

$node.data_map.xml_block.content.output.output_text|striptags()|trim