Create Space Button Macro

The Create Space Button macro displays a create space icon that links to the 'Create Space' page. To see this icon, viewers need the 'Create Space' permission which is assigned by a site administrator.

Using the Create Space Button macro

To add the Create Space Button macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros
  2. Find and select the required macro

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

Parameters

Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).

Parameter

Default

Description

Icon Size
size 

large

Specify whether to use large or small icon. Available values:

  • large
  • small

Code examples

The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page. 

Macro name: create-space-button

Macro body: None.

The following additional paramteters are available in storage format and wikimarkup.

Parameter name Required Default Parameter description and accepted values
width No

Natural size of icon

(1:1 pixel ratio)

The width of the icon to be displayed, specified in pixels. Confluence will stretch or shrink the width of the icon to the number of pixels specified.

Note: This parameter is not available via the macro browser.

height No

Natural size of icon

(1:1 pixel ratio)

The height of the icon to be displayed, specified in pixels. Confluence will stretch or shrink the height of the icon to the number of pixels specified.

Note: This parameter is not available via the macro browser.

Storage format example

Wikimarkup example

Was this helpful?

Thanks for your feedback!

4 Archived comments

  1. User avatar

    Todd Day

    The default for size is large, not small.

    I'd like to know how you put text next to this icon that will disappear when the user does not have space creation privs.  The Dashboard does this somehow.  How do I look at the wiki source for the dashboard?

    04 Mar 2010
    1. User avatar

      Sashidaran Jayaraman [Atlassian]

      Hi Todd,

      Thanks for letting us know the mistake, I have corrected it. I have actually created a user macro that does exactly what the create space button does in the Dashboard. In order to create a new user macro:

      1. Go to Dashboard > Administration > User Macros
      2. Click Create a User Macro.
      3. Name your user macro anything that you want. eg: createspace
      4. Untick "Macro has a body"
      5. Change Output to "Macro generates HTML markup"
      6. In the Template, copy and paste the following:
      7. Once you are done with that, you can simply use this macro anywhere in your page by specifying the following in your wiki markup:

      Feel free to change the code. Hope this helps.

      Cheers
      JSashi

      12 Mar 2010
  2. User avatar

    Neil

    What if I want to create a button that only creates one type of space from blueprint?

    21 Jul 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Neil, there's no way to do this. The Create Space Button macro takes you to the Create Space dialog, where you can choose a space blueprint.   If there are particular space blueprints you do not want people to use (anywhere in your site) you can disable them (go to Confluence Admin > Global Templates and Blueprints). 

      28 Jul 2014
Powered by Confluence and Scroll Viewport