[PHPTAL] PHPTAL 1.2.0 alpha - is this a bug or my fail?!
Kornel Lesiński
kornel at aardvarkmedia.co.uk
Thu May 14 17:18:54 CEST 2009
It seems that you've used slots where macros would have been more appropriate.
This just defines the same slot many times:
<span tal:repeat="entry entries" omit-tag="">
<span metal:define-slot="cfct_excerpt" />
</span>
and the code below it, outside the loop:
<div metal:fill-slot="cfct_excerpt" omit-tag="">
<div id="post-${entry/the_ID}" class="${entry/hybrid_entry_class}">
is run unconditionally, once, after the loop finishes. That's why you're getting error about entry variable.
Change these to:
<tal:block metal:use-macro="cfct_excerpt" />
and
<tal:block metal:define-macro="cfct_excerpt">
--
regards, Kornel
More information about the PHPTAL
mailing list