Hi Alister

Can you please post the code that assigns the variables to the template object?

E.g, If you did the var_dump on $data and $data['entries'] is defined, and you assigned $data to $template like

$template->data = $data;

...then I would expect  the loop to look like:

<span tal:repeat="entry data/entries" omit-tag="">

...Or did you assign it directly like:

$template->entries = $data['entries'];

As a sidenote, you can make use of the tal:block element if you don't want to output the tag:

<tal:block tal:repeat="entry entries">
<span metal:define-slot="cfct_excerpt" />

Kind Regards,

Alister Cameron wrote:

Perhaps I should stick to the production version but I hoped to help test the latest alpha.

I've encountered an issue where it's not iterating thru a repeat, but I don't see what I'm doing wrong.

Could I bother someone to have a look at the processed cache file and diagnose?


The TPL file is pretty simple:

<div metal:fill-slot="cfct_loop" omit-tag="">

<span tal:repeat="entry entries" omit-tag="">
<span metal:define-slot="cfct_excerpt" />


You can see the loop there but the persistent error -- even when I comment out that entire wrapping span tag -- is:

Unable to find variable 'entry' in current scope

I don't get it.

The var_dump of the data is here:


As far as I can tell it's fine... there's an array called "entries" and so forth... don't get the issue.



Alister Cameron // Blogologist

Mob. 04 0404 5555
Fax 03 8610 0050

Click here to find me online:

PHPTAL mailing list

PHPTAL mailing list

Reply via email to