Kornel Lesiński <kornel@...> writes:

> 
> On Wed, 09 May 2012 13:32:28 +0100, Pierre-Olivier Vares  
> <pov@...> wrote:
> 
> > I dropped this piece of code - I never use tal:define and  
> > metal:fill-slot in the same time. But has anybody an idea of a proper  
> > solution, correcting the 2 bugs ?
> 
> Yeah, it's a tricky piece of code. I've been going back and forth on this  
> for a while.
> 
> I wonder whether stack of contexts for macros should be handled separately  
> (pushSlotContext() rather than pushContext())...
> 


IMHO :
- separate slot contexts and var contexts seems (for me, but I just skimmed
through the code) risky : I'm afraid it generates other problems.

- metal:fill-slot is somehow incompatible with any other attributes (but, if you
did the modification, that's you encountered the case)

Therefore, if this was my code, I'd rather implement the following behaviour :
Treat automatically
  <tag metal:fill-slot [other_attrs]>
as
  <tal:block metal:fill-slot><tag [other_attrs]>

It can be done via a prefilter (some sort of "built-in" prefilter); or maybe
just changing the priority of fill-slot could be sufficient.



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

Reply via email to