Is there any way to access the full set of parameters passed to a User Macro without knowing them beforehand?
I am trying to create a general-purpose macro that can call any of several other macros or templates, and I don't see any way that I can just send all of the passed parameters on to another instead of having to check for the existence of each of any number of possible parameters.
I have also long desired this ability for debugging purposes, but I have never found it.
Unfortunately, user macros needs to know the parameters a head of time.
The parameters list is only accessible in a XHTML macro, which requires java code and is not user editable.
Thanks. I was all but certain of that, having pored over the documentation and tried every trick I could imagine, but wanted to be sure.
What I needed is to migrate a client's content that uses a Mediawiki feature that renders a template in the text of a page using parameters passed to it. Confluence's templates and blueprints only work when creating a new page, so that's out, but a User Macro might be able to accomplish the same by setting Scaffolding variables and invoking the Scaffolding plugin's live-template macro or, at the worst, creating a dynamic call to the Scaffolding plugin's REST API. In either case, I need to know the names of the parameters so as to set them appropriately.
Looks like I'll have to see what the plugin vendor can tell me about invoking a live template with parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Brian M Thomas, this is one of Scaffolding Plugin developers who work at ServiceRocket. Would you mind providing me more context so that I can help you out? what are the parameters you want to know the names of? Feel free to open a support ticket with us and share more context over there and we will assist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Abdullah:
Sorry for the lengthy delay; I only saw this reply just now.
What I needed was an equivalent to the MediaWiki template feature that allowed the content of a template page to appear in another with values specified by the invocation. Such templates are like User Macros and I decided to create one User Macro for each of the client's templates, but it turns out that neither User Macros nor Scaffolding was available to my client.
And I simply don't understand your second question at all: Since the whole problem is that I don't know what they are, I can't tell you which ones they are. Regardless, the desire for a User Macro that could learn which parameters it was invoked with was part of my attempt at a general macro that could be invoked with the name of a template page and parameters specific to that page to fill placeholders in it. It would allow a direct conversion of each invocation to a macro call with all the same parameters instead of distinct User Macros to replace each template.
I briefly considered the live-template macro as some kind of a workaround, but I don't think that it can be adapted to do what is needed since it introduces an intermediate edit mode that isn't needed and -- worse -- it has a fixed parameter list.
So unless you have in mind the crafting of a new kind of template macro with a dynamic parameter list, I don't think there's much you can do for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
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.