[PHPTAL] metal:define-slot, fill-slot, and macros
cephelo at gmail.com
Wed Nov 2 03:48:20 CET 2005
Based on the PHPTAL manual, I should be able to do the following:
--- file.htm ---
Today... .. ...
<html metal:use-macro="base.htm/column" />
--- base.htm ---
Content will come here
right? As far as I know, this worked fine in a prior version (or
something similar worked). Now the code that calls the macro in the
generated file.htm file is surrounded by:
$ctx->pushSlots(); and $ctx->popSlots();
which effectively clear $ctx->_slots for the macro inclusion and
restore it after the macro is done. Doesn't that defeat the purpose of
slots across multiple templates?
If I remove (or comment out) the functionality of Context::pushSlots()
and Context::popSlots() it works as I expect.
I generally try to abstain from modifying good source packages -- is
there a reason it behaves this way, or am I doing something wrong?
More information about the PHPTAL