I created a blueprint with a wizard that lets users input information and then creates a page with that information. Simple enough. Now I want to automatically create a child page for this template. I know its possible to create a page with children if I make a space blueprint but we already have spaces and really just need to create pages within them.
Is this something that can currently be done?
Community moderators have prevented the ability to post new answers.
HI, I just followed the tutorials atlassian has on its website. Let me know if you run into any specific problems I may be able to help with. https://developer.atlassian.com/display/CONFDEV/Write+a+simple+Confluence+Space+Blueprint
Hi Alex, How did you create a blueprint wizard? I am really scratching my head trying to find this out and it doesnt seem obvious to me at all :S Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
If the child pages can also adhere to a certain template (or even if they have no template at all) thats different from the template of the parent page, you can make a separate blueprint for the child pages. You can redirect, page editor to be the child page of any parent page with a simple ajax call as under, put this at the right place under the post-render method of your blueprint's javascript.
var parameters = JSON.stringify([AJS.Meta.get("space-key"),<name of the parent page>]);
$.ajax({
url: AJS.params.contextPath + "/rpc/json-rpc/confluenceservice-v2/getPage",
type: "POST",
data: parameters,
dataType: "json",
async: false,
contentType: "application/json",
success: function (data){
$("<id of the parent page>").val(data.id);
},
error: function(data) { alert("error while checking if the name of page exists") }
});
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.