[PHPTAL] Grabbing the METAL template from an object
Ken Restivo
ken at restivo.org
Thu Apr 6 04:59:19 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I vaguely remember seeing some very simple way to include a macro from an object. I remember thinking, "Wow, that reminds me of lisp macros, I could use that some day".
Well, that day is now. It turns out I definitely need this functionality, and I can't find the reference to where I saw how to invoke it.
Basically, the METAL template will be in the database, so users can edit it with a WYSIWYG editor. I fish the user-edited template out of the database, and now I have to get PHPTAL to use it.
My naive attempt-- which failed-- was:
<div metal:define-macro="main_body_macro"
tal:content="structure page/thank_you_notes/obj/main_body"></div>
<div metal:use-macro="main_body_macro"></div>
Which of course failed. How should I be doing this?
- -ken
- --
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFENIQHe8HF+6xeOIcRAoRfAKC+uLxPEZ39fisC+CK45+rkkKX/3wCg/kNN
UiGQaUBmAte68F5Uk3rDXq0=
=AJJy
-----END PGP SIGNATURE-----
More information about the PHPTAL
mailing list