Setting request scope variables from within macro

Marc Schipperheyn <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi,

I'm trying and failing to set a request scope variable from within a macro.

I've tried
<#global delayPhoto = 0>
<#macro delayedPhoto photo path type="thumb" >
	<#if (.globals.delayPhoto > 0)>
		<#global delayPhoto = .globals.delayPhoto + 1>
	<#else>
		<#global delayPhoto = 1>
[...]

<#global delayPhoto = 0>
<#macro delayedPhoto photo path type="thumb" >
	<#if (delayPhoto > 0)>
		<#global delayPhoto = delayPhoto + 1>
	<#else>
		<#global delayPhoto = 1>
[...]

and some other variations but delayPhoto always 
remain 0 when the macro is called.

How do I set a request scope variable from within a macro?


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.