velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Romianowski" <>
Subject RE: Velocimacros calling velocimacros?
Date Mon, 12 Aug 2002 20:07:36 GMT
Hi Derek,

you have to define the mochaLink-macro prior the sectionIndex-macro.
As I recall Velocity does not support forward-declarations of macros


-----Original Message-----
From: Derek Stevenson [] 
Sent: Monday, August 12, 2002 9:28 PM
Subject: Velocimacros calling velocimacros?


I have the following defined in my GlobalMacros.vm:

#macro (sectionIndex)
	#foreach ( $sectionlink in $sgslocation.SectionIndex )
	  #mochalink ( $sectionlink $sectionlink.Title )

#macro (mochaLink $mochalink $linktitle)

However, when I call


from a screen I get the following output in my browser:

link: #mochalink ( Section [title='Intervention' index='1' 
path=''] Intervention
link: #mochalink ( Section [title='No Intervention' index='2' 
path=''] No 
Intervention )

It looks like Velocity is calling #sectionIndex fine but won't call 
#mochaLink in turn, rather it simply expands #sectionlink and 
#sectionlink.Title.  Is this expected behavior?  Is there a flag
that allows me to call macros from other macros?  Or is this sort of 
functionality not supported, e.g. implement all behavior in sectionIndex

rather than calling mochaLink in turn?


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message