Create multiple pages from templates using blueprints. including children.

I am trying to make a blueprint that lets users create multiple pages. I understood this should be possible.

I have followed the blueprint tutorials in the developer guide and looked at the hello-blueprint example.

I manage to create on page but never more. from my plugins.xml:

<!-- Top level Blueprint -->
<blueprint key="my-blueprint" index-key="my-index" >
<content-template ref="simplebp-template"/>
<children>
<blueprint ref="my-blueprint-child"/>
</children>
</blueprint>

<blueprint key="my-blueprint-child" content-template-key="simplebp-template-child" index-key="my- index-child" >
<context-provider class="com.example.plugins.tutorial.confluence.simplebp.MyContextProvider"/>
</blueprint>

<!-- Template for Blueprint -->
<content-template key="simplebp-template" template-title-key="my.blueprint.title">
<resource name="template" type="download" location="/templates/testTemplate.xml" />
<context-provider class="com.example.plugins.tutorial.confluence.simplebp.MyContextProvider"/>
</content-template>

<content-template key="simplebp-template-child" template-title-key="my.blueprint.child.title">
<resource name="template" type="download" location="/templates/testTemplateA.xml" />
<context-provider class="com.example.plugins.tutorial.confluence.simplebp.MyContextProvider"/>
</content-template>

the top level blueprint and the child templates are identical.

BTW this is first meeting with atlassian development, so if anyone can point me to material for better understanding of what I am working with i would be grateful. for example the definitions of the ml elements.

5 answers

Fredrik,

Have you managed to create the child pages?

In the <blueprint> Data model , there is no <children> tag allowed. Where did you find this child definition inside a blueprint ?

I don't think it is possible to create such multiple pages from a page template. It is now possible in Confluence 5.3 for Space Blueprint (see https://developer.atlassian.com/display/CONFDEV/Space+Blueprints)

Regards

Hello Fredrik,

I don't know if you have found the solution to your problem, but maybe the Gaia add-on can help you. You can create a "template Space" with as much pages as you want. Then, for every new space you create, the add-on will instantiate everything.

Regards

this spam is not helpful for developers

&lt;blueprint key="my-blueprint" index-key="my-index" &gt;
&lt;content-template ref="simplebp-template"&gt;
    &lt;content-template ref="simplebp-template-child"/&gt;
&lt;/content-template&gt;
&lt;/blueprint&gt;

Try this instead. Don't believe there's a concept of nested <blueprint> tags or <children> tags.

Does anyone know what is wrong with this?

<space-blueprint key="example-space-blueprint" i18n-name-key="confluence.blueprints.space.example.name">
<content-template ref="example-space-homepage-template">

<content-template ref="example-child-a-content-template"> <!-- Main Page -->
</content-template>

</content-template>


<dialog-wizard key="example-space-blueprint-wizard">
<dialog-page id="exampleSpaceId"
template-key="Confluence.SpaceBlueprints.Example.dialogForm"
title-key="confluence.blueprints.space.example.dialog.create.title"
description-header-key="confluence.blueprints.space.example.dialog.create.heading"
description-content-key="confluence.blueprints.space.example.dialog.create.description"
last="true"/>
</dialog-wizard>


</space-blueprint>

Hi Fredrik,

Our Page Tree Creator can do your job without any programming.

Marketplace User review for our Page Tree Creator:

Page Tree Creator is absolutely fantastic. It is simple to use, well documented, and has great functionality. One of our departments has a 20+ page structure that they want in place for each of the companies they track. It took me less than an hour to set up Page Tree Creator such that they can go to a page, enter the name of a new company, click a button and immediately have the entire structure built out for that company. It plugs the company name into every page title to keep pages unique. We maintain a tree of the template pages to use and everything on those pages ends up in the new pages, any text, labels, macros. Very powerful and a huge time savings.

Give it a try: Marketplace link Page Tree Creator

Regards,
Stephan

this spam is not helpful for developers

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted 3 hours ago in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

25 views 0 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you