How to Create a User Macro to Create Spaces
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
There is a simple way to create your own macro to create a new space - just like the {create-space-button}. You can simply follow the below steps in order to have the ability to create spaces from pages:
Go to Browse > Confluence Admin > User Macros
Click on Create a User Macro
Fill the fields as follows:
Macro Name: createspace
Macro Title: createspace
Template:
1 2 3
<a id="create-new-space-link" class="fontSizeDefault" href="/spaces/createspace-start.action"> <img src="/images/icons/add_space_32.gif" align='absmiddle' height="32" width="32"></a> <br />
4. Click on Save
5. To test, create a new page and test this new macro you have created by typing {createspace} or selecting it from the Macro Browser.
Was this helpful?