PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_Template_Flexy » Bug #4838

Variable inside flexy:foreach did nto work as expected

Details

Submitted2005-07-15 08:10 UTC
Frompapipo at gmail dot com
StatusBogus
PackageHTML_Template_Flexy
PHP Version4.3.11
OSDebian
Roadmaps(Not assigned)

Comments

[2005-07-15 08:10 UTC] papipo at gmail dot com

Description:
------------
I'm trying to make a list of links in three columns. I divide the $key by 3, and I check if it's an integer. If it is, I put a <br /> to switch to a new line.

Reproduce code:
---------------
<span flexy:foreach="content_list,key,data"><a href="{baseURL}/Content/View/{data[content_id]}">{data[name]}<br flexy:if="GLOBALS.is_int(key/3)" /></span>

Expected result:
----------------
<a href="">Link></a><a href="">Link></a><a href="">Link></a><br />
<a href="">Link></a><a href="">Link></a><a href="">Link></a>

Actual result:
--------------
No <br /> shown. The problem is that in GLOBALS.is_int(key/3), It uses $t->key instead of $key.