function

Author Message

jb bianchi

Friday 19 August 2005 8:00:45 am

hi,

there is function which give the word "Array". How do I do to see the content of this Array?

thank's

J-A Eberhard

Friday 19 August 2005 1:50:50 pm

You can use this in the template, just replace $node by the variable name.
{$node|attribute( show, 1 )}
The result looks like a print_r() in php.

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

jb bianchi

Saturday 20 August 2005 3:41:26 am

hi,

thank's but I have ever done it and I have been surprised because the result of {$variable|attribute(show)} was only the header of the table:

Attribute Type Value

 

Gabriel Ambuehl

Saturday 20 August 2005 4:23:18 am

Could it be that your array is empty?

Visit http://triligon.org

jb bianchi

Saturday 20 August 2005 4:34:13 am

Maybe,

IN fact I want to explod this variable $var5.
And $var5= "/corporate/expert/bianchi_n">BIANCHI n .
I have done it {$var|explode(">")}
And the result is "Array".
I have try to do this too:

{set-block variable=$nbdemot}
{$var5|ord}
{/set-block}
<br />{$nbdemot}
the result is the same.

My problem is I need the word just after the ">" in order to do test.

Marko Žmak

Sunday 21 August 2005 5:47:44 am

Why don't you copy-paste the entire code you're using here, so we could inspect it.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

jb bianchi

Sunday 21 August 2005 7:08:05 am

hi,


{default use_url_translation=false()}
    <td class="{$sequence}">
{set-block variable=$exam}
	{attribute_view_gui attribute=$node.object.data_map.an_expert}
	{/set-block}
{*for example, the content of $exam is 'babar'
if I do this:*}
{$exam}=
{*I can see:
babar
=*}
{* If i do this:*}
{$exam|wash}
{*I can see:
<a href="/corporate/expert/babar">babar</a></br>*}
{*I want just to have the word between <a href=..> and </a><br /> to do test. First I cut with remove the end and I obtain this:
 <a href="/corporate/expert/babar">babar
Secondly, I remove <a href= 

but I have "/corporate/expert/babar">babar
and I call it $var5
So I have try to do it:
*}
{set-block variable=$nbdemot}
{$var5|expolde('>'}
{/set-block}
<br />{$nbdemot}
{*I can see the word array*}
{/default}

thank's

jb bianchi

Tuesday 23 August 2005 2:58:49 am

hi,

I have achieved my goal. There is no problem now. thak's for the answers.

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 31 2025 04:19:06
Script start
Timing: Jan 31 2025 04:19:06
Module start 'layout'
Timing: Jan 31 2025 04:19:06
Module start 'content'
Timing: Jan 31 2025 04:19:06
Module end 'content'
Timing: Jan 31 2025 04:19:06
Script end

Main resources:

Total runtime0.0145 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.0062 588.0078151.1953
Module start 'layout' 0.00620.0025 739.203136.5938
Module start 'content' 0.00880.0042 775.796998.2344
Module end 'content' 0.01300.0015 874.031337.9922
Script end 0.0145  912.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002516.9824140.0002
Check MTime0.00128.1859140.0001
Mysql Total
Database connection0.00085.722110.0008
Mysqli_queries0.002618.031330.0009
Looping result0.00000.090310.0000
Template Total0.00117.710.0011
Template load0.00095.901010.0009
Template processing0.00031.810510.0003
Override
Cache load0.00064.179110.0006
General
dbfile0.00032.225880.0000
String conversion0.00000.054240.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