This question is in reference to Atlassian Documentation: User Macro Template Syntax
I'm looking for the syntax for control structures like #foreach - what else is available? I want to show all the spaces, similiar to https://answers.atlassian.com/questions/43122/know-space-administrators, but I get a timeout, so I want to exit the foreach at a certain count... unless I can figure out a different way to limit getAllSpaces().
Thanks! I got #break to work (I guess I wasn't doing it correctly the first time I tried). Now I just have to figure out how to partially query spaces, because the foreach over $spaceManager.getAllSpaces() times out after 13 or so. Using a version of this: https://answers.atlassian.com/questions/43122
You can use the #break command to break out of a #foreach loop. More information about Velocity itself can be found on this page: http://velocity.apache.org/engine/devel/user-guide.html
I think Confluence uses Velocity 1.6, and they do not have any plugins installed, so no MathTool, SortTool, etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are also if statements. What are you trying to do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.