Explode String

Author Message

Muhammad Khalid Majeed

Thursday 06 May 2004 4:28:05 am

I am trying to split the body of article by the following:

{attribute_view_gui attribute=$:item.object.data_map.body|explode("<br />")}

but this is not working.

Can any body help me???

Muhammad Khalid
Software Engineer
www.webgurru.net

Paul Forsyth

Thursday 06 May 2004 4:59:23 am

If your body attribute is a xml text field try:

{$:item.object.data_map.body.content.output.output_text|explode("<br />")}

paul

--
http://www.visionwt.com

John Mina

Thursday 06 May 2004 5:29:51 am

What does the EXPLODE statment, do ?

?
Sicnerely
JOhn

Alex Jones

Thursday 06 May 2004 6:23:54 am

IT allows you to split the contents of an array.

Array Handling Documentation: http://ez.no/ez_publish/documentation/development/libraries/ez_template/operators/array_handling

Alex

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

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

Muhammad Khalid Majeed

Friday 07 May 2004 12:03:46 am

Thanx Paul

{$:item.object.data_map.body.content.output.output_text|explode("<br />")} is working in my case.

Muhammad Khalid
Software Engineer
www.webgurru.net

John Mina

Saturday 08 May 2004 11:43:56 pm

Thanks TO you guys
I understood it now , will chekc if i can use it :)

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 16:04:53
Script start
Timing: Jan 18 2025 16:04:53
Module start 'layout'
Timing: Jan 18 2025 16:04:53
Module start 'content'
Timing: Jan 18 2025 16:04:53
Module end 'content'
Timing: Jan 18 2025 16:04:53
Script end

Main resources:

Total runtime0.0219 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.7891152.6094
Module start 'layout' 0.00580.0026 740.398439.4063
Module start 'content' 0.00830.0116 779.804793.2813
Module end 'content' 0.01990.0020 873.085934.3047
Script end 0.0219  907.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002411.0429140.0002
Check MTime0.00125.3214140.0001
Mysql Total
Database connection0.00083.480510.0008
Mysqli_queries0.003013.595930.0010
Looping result0.00000.050010.0000
Template Total0.00167.410.0016
Template load0.00083.767610.0008
Template processing0.00083.566410.0008
Override
Cache load0.00062.567210.0006
General
dbfile0.00062.568380.0001
String conversion0.00000.028340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs