[PHPTAL] Grabbing the METAL template from an object

Eric Bartels e.bartels at online.de
Thu Apr 6 08:32:52 CEST 2006


Hi,

are you within the same template file? What does fail mean?
Can you give an error message?

Eric

Ken Restivo wrote:
> -----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-----
> 
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal



More information about the PHPTAL mailing list