Create blank pages with names in tree structure when space is created
Asked by Alok Juneja:

Hi,

I have made the space blueprint. Which works like charm. I want that whenever I create a confluence workspace, empty blank pages with only their headings are created so that I can have a tree structure. Any idea how to achieve this.

Help / suggestion would be highly appreciated.

BR

Alok


Answers:
author: Dominic Lagger
body: Hi [@Alok Juneja](/t5/user/viewprofilepage/user-id/3761805)

What do you mean by space blueprint?

Did you do this: [Write a simple confluence space blueprint](https://developer.atlassian.com/server/confluence/write-a-simple-confluence-space-blueprint/) ?

If yes, there you should be able to change the blueprint with empty pages.

If no, there is no good option to achieve your goal without any apps.

You could use "Space Admin Browser" or "ScriptRunner for Conflunce" to copy a template space.

Regards, Dominic

comments: author: Alok Juneja
body: hi [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)

I did follow the instructions that are listed in the link that you provided and was able to create the customized home page when I create the workspace. What I was looking for to create empty pages and child pages that are empty so that I can construct the tree structure when space is created.

Do you know what classes to use or you have some example code to achieve this.

BR

Alok


author: Dominic Lagger
body: Oh, okay.

I never did this before.

I found a really old question here in the community:

<https://community.atlassian.com/t5/Answers-Developer-Questions/Blueprint-with-multiple-child-pages/qaq-p/521282#M115421>

There is a hint in the 3rd comment. Can you try this?  
Perhaps it is not up to date, but it can help you to investigate further.

Regards, Dominic


author: Alok Juneja
body: [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)Yes it did work. Thanks for pointing me to the right direction.

BR

Alok


author: Alok Juneja
body: [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)I am only able to create only one child page. That is very strange.

```
 <content-template key="homepage" i18n-name-key="confluence.blueprints.space.example.homepage.name">
<description key="confluence.blueprints.space.example.homepage.desc"/>
<resource name="template" type="download" location="/xml/space-home.xml"/>
</content-template>

 <content-template key="meetings" i18n-name-key="confluence.blueprints.space.example.meetings.name">
<description key="confluence.blueprints.space.example.meetings.desc"/>
<resource name="template" type="download" location="/xml/page.xml"/>
</content-template>

?<content-template key="decisions" i18n-name-key="confluence.blueprints.space.example.decisions.name">
<description key="confluence.blueprints.space.example.decisions.desc"/>
<resource name="template" type="download" location="/xml/page.xml"/>
</content-template>
```

```
<space-blueprint key="space-blueprint" i18n-name-key="confluence.blueprints.space.example.name" category="examples">
<content-template ref="homepage">
<content-template ref="meetings"/>
<content-template ref="decisions"/>
</content-template>
</space-blueprint>
```

Any idea why so.


author: Dominic Lagger
body: I don't know, sorry. I've never did this before...


author: Alok Juneja
body: [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)I was doing some mistake. It is working and I am able to generate multiple child pages.


Tags: confluence-server

server