velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Stevenson <>
Subject Velocimacros calling velocimacros?
Date Mon, 12 Aug 2002 19:28:02 GMT

I have the following defined in my GlobalMacros.vm:

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

#macro (mochaLink $mochalink $linktitle)
	<A HREF="$link.setPage("$mochalink.VelocityURI").addPathInfo("action", 

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 somewhere 
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: <>

View raw message