On 18-06-2010 at 14:46:13 GRolf <ger...@pictureparking.com> wrote:
let's say I have a query that will fetch employees from a table. every
row has a field "department_id".
when looping through this array in my template, is there a way to call a
"callback" function that will fetch the department's name from an other
PHPTAL automatically calls methods in TAL expressions. If you use ORM it
should be quite simple, e.g. if you have Employee object that has
getDepartment() method that returns Department object:
<li tal:repeat="employee employees"
Alternatively you can call PHP functions using php: prefix in expressions:
<li tal:repeat="employee_row employees_array">
-- regards, Kornel
PHPTAL mailing list