Stupid question about adding items to arrays

Author Message

Eivind Marienborg

Monday 28 February 2005 6:35:03 am

I've been trying for quite some time now, but just can't get this to work:

{let mitt=$parent_nodes}
{set $mitt|append($node.node_id)}

{section name=jenses loop=$mitt|unique}

  {$jenses:item}

{/section}
{/let}

This outputs the parent_nodes, but not the node.node_id.

I've also tried without the 'set' in front of the append, also without results.

Any pointers, anyone?

Eivind Marienborg

Monday 28 February 2005 6:52:34 am

Sorry to bother you.. I got it working with this:

{let mitt=$parent_nodes}

{section name=jenses loop=$mitt|unique|append($node.node_id)}
 {$jenses:item}
{/section}

{/let}

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

Main resources:

Total runtime0.0237 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.0048 588.2578151.2266
Module start 'layout' 0.00480.0020 739.484436.6797
Module start 'content' 0.00680.0154 776.164190.1875
Module end 'content' 0.02220.0014 866.351629.9922
Script end 0.0237  896.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00239.7198140.0002
Check MTime0.00104.1135140.0001
Mysql Total
Database connection0.00072.927410.0007
Mysqli_queries0.00198.175630.0006
Looping result0.00000.038210.0000
Template Total0.00104.310.0010
Template load0.00083.345910.0008
Template processing0.00020.945610.0002
Override
Cache load0.00062.442510.0006
General
dbfile0.003916.400680.0005
String conversion0.00000.024140.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