Forums / Setup & design / Operator for Array size

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

Operator for Array size

Author Message

Roberto Frascarelli

Thursday 29 September 2005 9:58:29 am

Hi all,
I was very surprised for the disappearing of the <b>counts</b> array operator in templates.
The previous existance is documented in my one year old ezbook, but now it doesn't work in 3.6.2 CMS version.
How can I calculate array size now ?
Thanks in advance

Łukasz Serwatka

Thursday 29 September 2005 11:47:43 am

Roberto, use "count" operator

{def $my_array=array( 1, 2, 3, 4, 5, 6 )}

{$my_array|count}

returns 6

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog