[PHPTAL] Dynamic macros

2008-10-21 Thread Maciej Łebkowski
Hello, Sometimes its comfortable to generate macros from dynamic data. Is there any way to use macros from memory instead of files? For now, it seems that this code works: tal:block metal:use-macro=$dynamic/test / $dynamic is a data-uri, i.e. data://text/plain;base64, . base64_encode(macro)

Re: [PHPTAL] Dynamic macros

2008-10-21 Thread Kornel Lesiński
On 21-10-2008 at 07:03:50 Maciej Łebkowski [EMAIL PROTECTED] wrote: I dont know if there are any drawbacks — cache, optimisation, etc? If you've implemented PHPTAL_Source well then cache should work fine as long as code of the macro doesn't change too often. Or maybe I am missing some

Re: [PHPTAL] Dynamic macros

2008-10-21 Thread Kornel Lesiński
On 21-10-2008 at 12:52:02 Maciej Łebkowski [EMAIL PROTECTED] wrote: I don`t think it is possible. ;-) It relies too much on the user input. For example, the content of the page (markdown syntax) can be extended with some data from atom feed. Reading of atom feeds doesn't sound like