I asked this question some time ago but was unable to test it until now. This is Confluence 5.0
I built the macro as shown. It works perfectly well, but isn't appearing in the Macro Browser. In the macro editor, these settings are ticked or selected:
Documentation url = a page in our wiki, written as a full url eg
http://mywiki.com/display/spacekey/wiki+page
I've had a dig through the documentation including this nice page: Including Information in your Macro for the Macro Browser but I don't see anything helpful there.
(Interestingly my original old macro that does the same thing also continues to work even though it has a red flag against it. It doesn't appear in the Macro Browser either. )
(Minor edit: fixed the documentation url)
I discovered a bug in Confluence 5.5.2 where if your user macro doesn't have any parameters, it will not show up in the Macro Browser. I didn't check Jira to see if this had been already reported. But you can workaround it by adding a "dummy" parameter to your macro.
For example, the following macro will NOT appear in macro browser:
## Macro title: Next Step ## Macro has a body: Y ## Body processing: Rendered ## ## Developed by: C. Rand McKinney ## Date created: 18 July 2014 ## Installed by: C. Rand McKinney <div style="font-size: 11pt; font-weight: bold; border: 1px solid #cccccc; background-color: #EBF5EB; padding: 10px; border-radius: 3px; margin: 10px 50px 10px 50px;"> $body </div>
But if you add a "dummy" parameter as follows, it will appear in macro browser:
## Macro title: Next Step ## Macro has a body: Y ## Body processing: Rendered ## ## Developed by: C. Rand McKinney ## Date created: 18 July 2014 ## Installed by: C. Rand McKinney ## @param Name:title=Reviewer Name|type=string|required=false|desc=Your name <div style="font-size: 11pt; font-weight: bold; border: 1px solid #cccccc; background-color: #EBF5EB; padding: 10px; border-radius: 3px; margin: 10px 50px 10px 50px;"> $body </div>
Thank you. Sorry for the delay in replying. I can't test this out right now (test system was deleted, upgrade is still pending). I'll revisit this as & when and let you know if it works for me or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't necessarily have to create a dummy parameter, you can instead include the following line at the top of your user macro:
## @noparams
This will also prevent an error message from showing in the user macro browser.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Rand & Stephen -- it's working AND appears in the macro browser.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Rand and Stephen. I had the same problem and it was driving me nuts for weeks. You guys saved the day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Neither adding
## @noparams
nor
## @param Name:title=Reviewer Name|type=string|required=false
in 5.9.x doesn't help to display User Macros in specified category of Macro Browser.
It is possible to find such macros only by searching by macros name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.