velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Stevenson <de...@retrocode.com>
Subject Re: Velocimacros calling velocimacros?
Date Mon, 12 Aug 2002 20:10:15 GMT
Duh.  Changed mochalink to mochaLink and all works great.  Sorry for the chaff.

Cheers,
Derek

At 12:28 PM 8/12/2002, you wrote:
>Hi,
>
>I have the following defined in my GlobalMacros.vm:
>
>#macro (sectionIndex)
>         #foreach ( $sectionlink in $sgslocation.SectionIndex )
>           link:
>           #mochalink ( $sectionlink $sectionlink.Title )
>           <BR/>
>         #end
>#end
>
>#macro (mochaLink $mochalink $linktitle)
>         <A 
> HREF="$link.setPage("$mochalink.VelocityURI").addPathInfo("action", 
> "UpdateLocation").addQueryData("sectionpath", 
> "$mochalink.SectionPath").addQueryData("pageid", 
> "$mochalink.PageID")">$linktitle</A>
>#end
>
>However, when I call
>
>#sectionIndex
>
>from a screen I get the following output in my browser:
>
>link: #mochalink ( Section [title='Intervention' index='1' 
>path='bingeeating.bequiz-feedback.be-conseq1.intervention'] Intervention )
>link: #mochalink ( Section [title='No Intervention' index='2' 
>path='bingeeating.bequiz-feedback.be-conseq1.nointervention'] 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?
>
>Thanks,
>Derek
>
>
>--
>To unsubscribe, 
>e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:velocity-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message