Hi Simon, Did you assign a value to your variable before setting it in the context? I've been using this syntax for years, at least with Magnolia 4, maybe it doesn't work anymore with Magnolia 5, but i can't see why. Don't forget that the context will only store a value, not some kind of pointer to your variable. So each time you change the value you must set it again in the context.
Here is a more detailed example in case you missed something: [code] [#-- Init --] [#assign videoNumber = 0 /] ${ctx.setAttribute('videoNumber', videoNumber, 0)} ... [#-- Retrieve, increment and set back in context --] [#assign videoNumber = ctx.getAttribute('videoNumber') + 1] ${ctx.setAttribute('videoNumber', videoNumber, 0)} [/code] -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=206673ac-0a3d-4663-ab6b-e4b32d315dc8 ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com> ----------------------------------------------------------------