Forums / Developer / function

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.

eZ debug

Timing: Jan 31 2025 01:15:02
Script start
Timing: Jan 31 2025 01:15:02
Module start 'content'
Timing: Jan 31 2025 01:15:02
Module end 'content'
Timing: Jan 31 2025 01:15:02
Script end

Main resources:

Total runtime0.2005 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.7500370.3125
Module start 'content' 0.00590.0140 958.06251,009.5859
Module end 'content' 0.01990.1805 1,967.64843,893.3125
Script end 0.2005  5,860.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00482.3729200.0002
Check MTime0.00140.6793200.0001
Mysql Total
Database connection0.00050.246810.0005
Mysqli_queries0.101350.49781410.0007
Looping result0.00140.70121390.0000
Template Total0.180189.810.1801
Template load0.00090.457310.0009
Template processing0.179189.339610.1791
Override
Cache load0.00060.298310.0006
Sytem overhead
Fetch class attribute can translate value0.00180.908210.0018
XML
Image XML parsing0.00030.135710.0003
General
dbfile0.01155.7312200.0006
String conversion0.00000.002530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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