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" />
</tal:block>


Kind Regards,
Werner


Alister Cameron wrote:
Gents,

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?

http://www.alistercameron.com/tal.src.txt

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" />
</span>

</div>

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:

http://www.alistercameron.com/tal.data.txt

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

Cheers,

-Alister

---
Alister Cameron // Blogologist
http://www.alistercameron.com

Mob. 04 0404 5555
Fax 03 8610 0050

Click here to find me online:
http://clicktoadd.me/alicam
------------------------------------------------------------------------

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to