How can I use variables in a page in Confluence please? For example I want to type "company" variable and have it insert my company name, address, city, state.
Can I have a list of variables for a space that all pages in the space can use ?
Tell us which product you want help with -- Confluence?
I did get a "User Macro" setup to include text with the reference to the user macro "{mymacro}". Is that the only way ?
I'm not quite understanding what you mean by a variable. Do you mean that you would type 'company' and the values would change, depending on who you are (ie what company you work for?).
In either case, writing either a user macro or a plugin would probably be the way to go. If it's simply a text replacement, it looks like you already discovered the user macro. If it's a true variable, and pulls some data from LDAP, you can probably even do that in a user macro as well (you can access the user object, then try to get user properties), like this:
($generalUtil.getUserAccessor().getUser($userId))
There's a good example here. Let us know more specifically what you want.
See reply.
I think that the question can be explained as follows (this is also my question):
How might this be accomplished?
I dont see this question answered yet. I have a similar requirement to meet and would be glad if any one in the Community can provide a feasible solution
@K Cann
Did you get this question answered. I am not able to view your reply.
how do you create a "User Macro"?
Were you able to find answer on this?
I have not, and K Cann's explanation is accurate
The answers here provides help on this topic.
https://community.atlassian.com/t5/Confluence-questions/using-variables-in-confluence-text/qaq-p/431661
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
Hi,
Is the option of Variables not available anymore?
Cheers
Mediawiki is way better than Confluence... How bad is this implemented in Confluence?
https://de.wikipedia.org/wiki/Hilfe:Variablen
Just see the example of Wikipedia, where the pagename can be easily added as variable into a link, or text or whatever.
Confluence seems to lack the basic simplicity and syntax of every wiki system ever made.
It looks like you're new here. Sign in or register to get started.