You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Kelvin Tan <ke...@relevanz.com> on 2002/05/15 03:23:03 UTC

[bump] Accessing over-ridden macros within parse

A bump of a post couple of days back but had no reply. Here's another
shot...

----- Original Message -----
From: "Kelvin Tan" <ke...@relevanz.com>
To: <ve...@jakarta.apache.org>
Sent: Friday, May 10, 2002 11:38 AM
Subject: Accessing over-ridden macros within parse


> I have templates which invoke a global velocimacro like this (Geir you'll
> recognize this neat trick):
>
> foo.vm:
> #macro (pagebody)
> blah blah
> #end
>
> #layout ()
> ## end of foo.vm
>
> globalMacros.vm:
> #macro (layout)
> blah blah
> #pagebody()
> #end
> ## end of globalMacros.vm
>
> All is fine. However, I'm now attempting to do this:
>
> globalMacros.vm:
> #macro (layout)
> blah blah
> #parse(bar.vm)
> #end
> ## end of globalMacros.vm
>
> bar.vm:
> #pagebody()
> ## end of bar.vm
>
> and this kinda falls flat on its face. I also tried adding an empty
pagebody
> macro declaration within globalMacros.vm in the hope that it would be
> overriden by foo.vm's pagebody but it wasn't. My velocity.properties are
>
> velocimacro.library = globalMacros.vm
> velocimacro.library.autoreload = true
> velocimacro.permissions.allow.inline = true
> velocimacro.permissions.allow.inline.to.replace.global = true
> velocimacro.permissions.allow.inline.local.scope = true
> velocimacro.context.localscope = false
>
> It's pretty important for inline vms to have local scope for me.
>
> Any ideas on how I can get it working?
>
> Regards,
> Kelvin
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>