Re: [PHPTAL] macros in external files

2010-01-15 Thread Kornel Lesiński

On 15-01-2010 at 16:07:45 Peter Niederlag pe...@niederlag.de wrote:


I want to explore the possibilities of macros. Using a
metal:define-macro INSIDE my template works as expected.

However I fail to use a macro defined in another file.

Trying to access the same macro from another template by
'metal:use-macro=file.xhtml/mymacro' unfortunatly fails. :-

It seems to me that the generated template tries to call a
'tpl_4b5072d9_functions__hdJL174SgV8j9WAXA4fLmw_mymacro()' but the
generated file has written this function into
'tpl_4b5072d9_functions__hdJL174SgV8j9WAXA4fLmw()'

Note that the '_maymacro' part is missing here.

Does anybody have an example on using macros in external files that is
working? Or could it be there is a bug?


The external file has to have element with appropriate metal:define-macro  
attribute.


In your case file.xhtml is expected to have foo  
metal:define-macro=mymacro.


You can't simply call entire file as macro.

--
regards, Kornel

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


Re: [PHPTAL] macros in external files

2010-01-15 Thread Peter Niederlag
Hello,

Kornel Lesiński schrieb:
 On 15-01-2010 at 16:07:45 Peter Niederlag pe...@niederlag.de wrote:

[...]

 You can't simply call entire file as macro.

I know. ;) Whatever I messed up (editing the wrong file/..?), suddenly
everything is working like a charme. :-

Thx for your quick response.

phptal is a really great product!

Greets,
Peter

-- 
Peter Niederlag * Speckmannweg 2 * 21339 Lüneburg *
Fon (mobil): 0172 / 516 48 55 *
callto:typo3support (skype)
http://www.niekom.de * TYPO3 und EDV Dienstleistungen *

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