add-label-from-url



add-label-from-url

Adds a label to the current page based on the parameters passed in from the URL.

Usage: Simply append "?addLabel=labela,labelb,labelc" to the URL for the page and this macro will automatically add those labels to the current page.
Macro has a body: Macro does not have a body
Body type: Use unprocessed macro body
Macro Output: Macro generates HTML markup
Macro Body:

#set($labels = $req.getParameter('addLabel').split(','))
#foreach($label in $labels)
#set($success = ${content.labelUtil.addLabel($label,$action.labelManager,$remoteUser,$content)})
#end

Required Plugins:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Mar 01

    B. Walker says:

    See this forum post for a slight variation on this: [http://forums.atlassian.com...

    See this forum post for a slight variation on this: [http://forums.atlassian.com/thread.jspa?messageID=257300464&#257300464]