Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

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 Using Autocomplete.

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 nameRequiredDefaultParameter description and accepted values
widthNo

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.

heightNo

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

  • No labels

2 Comments

  1. 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?

    1. 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