Hi there,
I'm creating a blueprint plugin module and I need create a page from a template with and 2 child pages need to be created.
Example:
Main Page (Page being created)
Someone can help me please?
Thanks,
RMRodrigues.
Community moderators have prevented the ability to post new answers.
Following the blueprint tutorial (https://developer.atlassian.com/display/CONFDEV/Write+a+simple+Confluence+Space+Blueprint) you have to change the atlassian-plugin.xml:
... <space-blueprint key="first-space-blueprint" i18n-name-key="confluence.first.space.blueprint.name"> <content-template ref="hierarchy-blueprint-content-template"> <!-- Home --> <content-template ref="hierarchy-child-a-content-template"> <!-- Main Page --> <content-template ref="hierarchy-child-child-a-content-template"/> <!-- 1st child --> <content-template ref="hierarchy-child-child-b-content-template"/> <!-- 2nd child --> <content-template ref="hierarchy-child-child-c-content-template"/> <!-- 3rd child --> </content-template> <!-- End of Main Page --> </content-template> <!-- End of Home -->
All pages are just content-template unless you want to be able to use them later too.
Hi Rui,
If you also have a Jira instance, you could use one of the 2 following product to create a Page Tree Template in Confluence:
Using those tools, you could export a Space or a Page Tree Template. You could add macro and parameter that will be use during the instanciation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For those who do not want to get into the Java programming. Try our Page Tree Creator Add-on.
Our Add-on Page Tree Creator works a bit different than the Confluence blueprints / templates. The PTC-templates are based on normal confluence pages and therefore creating a PTC-template is as simple as creating a Confluence page. Of course you could start creating your PTC-blueprint based on an existing Confluence page.
Try our Live Examples (no registration needed).
Marketplace link: Page Tree Creator.
Regards,
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying this and i cant make a template with default pages
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi mitesh,
do u have managed do make this work by now ?
I'm trying to achieve pretty much the same ^^
I need a space Blueprint with mutliple pages inside and i can't get things to work.
this is my space blueprint tag:
<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-space-childpage-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>
and then i have the followig content template tags:
<content-template key="example-space-homepage-template" i18n-name-key="confluence.blueprints.space.example.homepage.name"> <description key="confluence.blueprints.space.example.homepage.desc"/> <resource name="template" type="download" location="/xml/example-space-home.xml"/> </content-template> <content-template key="example-space-childpage-template" il8n-name-key="confluence.blueprints.space.example.childpage.name"> <description key="confluence.blueprints.space.example.childpage.desc"/> <resource name="template" type="download" location="/xml/example-child-page.xml"/> </content-template>
When i create the a space with my Blueprint i the space home page is generated but no other child pages.
Any idea what i'm doing wrong there?
best regards Irakli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Irakli,
Just wanted to follow up with you regarding the above concern. I am stucked with the same problem and I am trying to achieve same thing. Did you find a way out for it?
Thanks,
Aaqib
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rui,
For creating two child pages, I guess you can try creating the pages using Java API in the blueprints contextprovider's updateBlueprintContext method, as that one does get called when the blueprint renders.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How I can create a page from JAVA API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, you can create an object of type Page in the method mentioned in my answer, using the API reference for Confluence depending on version of confluence you are using. Ref: https://docs.atlassian.com/atlassian-confluence/latest/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess you can also try Eduardo's approach too ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.