Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Macro name in the macro browser

Sean Kim December 14, 2022

How do you change the way macro name shows up in the macro browser?

I want to change the Helloworld macro to show up as "Hello World" in the browser but want to be able to type { helloworld } in the page to insert it.

This is the way it works for the bundled plugins.

For example, bundled plugin { userlister } shows up as "User List" in the macro browser.

Is there a property that can be set to override the macro's display name in the macro browser?

 

Referring to the plugin's macro module. Not the User macro.

https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-confluence-hello-world-macro/

3 answers

1 accepted

0 votes
Answer accepted
Sean Kim December 15, 2022

Solved by adding i18n-name-key to the macro element in atlassian-plugin.xml and the appropriate value in the plugin's properties file.

<xhtml-macro name="helloworld" class="com.atlassian.tutorial.macro.helloworld" key='helloworld-macro' i18n-name-key="helloworld.macro.name">
0 votes
Fabio Racobaldo _Herzum_
Community Champion
December 15, 2022

Hi @Sean Kim ,

welcome to the Atlassian community!

When you try to enter macro through { you need to add Macro Title and not Macro Name.

Hope this helps,

Fabio

0 votes
Florian Bonniec
Community Champion
December 14, 2022

Hi @Sean Kim 

It should display the 'Macro Title' no ?

{helloworld} is the macro 'Macro name' as documented here.

 

Regards

Sean Kim December 15, 2022

Sorry I should have mentioned that it's for a plugin not the user macro.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.19.2
TAGS
AUG Leaders

Atlassian Community Events