Forums / General / Stupid question about adding items to arrays

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

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}