Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create multiple pages from templates using blueprints. including children.

Deleted user August 28, 2013

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

0 votes
EPS Software Engineering AG
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2016

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

Kai Mosebach February 26, 2017

this spam is not helpful for developers

Like Ben Li likes this
0 votes
mitesh February 5, 2015

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>

0 votes
Sid Sethi August 6, 2014
&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.

0 votes
LUC FILION June 3, 2014

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

Kai Mosebach February 26, 2017

this spam is not helpful for developers

Like Ben Li likes this
0 votes
Xavier Arques November 4, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events