6.0.0-beta1
7/29/25

[#4413] Allow template <loop> tag to render keyed arrays
Summary Allow template <loop> tag to render keyed arrays
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners
Requester tevans (at) tachometry (dot) com
Created 09/12/2006 (6895 days ago)
Due
Updated 09/13/2006 (6894 days ago)
Assigned
Resolved 09/13/2006 (6894 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/13/2006 10:41:25 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
Makes sense. Committed, thanks.
09/12/2006 08:56:02 PM tevans (at) tachometry (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Allow template <loop> tag to render keyed arrays
Queue ⇒ Horde Framework Packages
New Attachment: template_patch.txt Download
Reply to this comment
The Template library currently supports nested arrays for the <loop> 
tag if the given array uses numeric keys. However, it is also helpful 
to use arrays that have non-numeric keys to render HTML (for example, 
a list of database rows).



Thie attached patch file removes the constraint for numeric keys. Note 
that most of the changed lines in Tempate.php have been flagged due to 
whitespace changes only. A single "if" statement (line 12 in the patch 
file) was removed.



I have included updates to the Template PHPUnit test suite to 
demonstrate the changed behavior. The new and existing tests were run 
successfully with the proposed changes.



Thank you for your consideration.



Tom Evans

Tachometry

Saved Queries