select between 2 blueprints within dialog wizard page of another blueprint

vandyke November 5, 2015

hello guys,

i know there is a way to choose between multiple templates within single blueprint but unfortunately this is not what i am asking for.

the solution i would like to have looks exactly like task management blueprint or jira-report blueprint where on the first dialog page you can choose between other blueprints which were not visible before. 

i can imagine that the simplest way ist to define the blueprints as hidden webitems and add and enable them in the dialog page .soy template but i am new to confluence and dont have any clue how to do that. do you have any ideas what can i try?

with best regards, alexander

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Patrick Masopust November 11, 2015

Well, sorry to disappoint you, but what you need is a single blueprint with several templates.

Let's take a look on what happens when you create a page from the task management blueprint. On the first step you'll select the blueprint. You're being asked for what type of task management blueprint should be created. Once you hit the "create" button on the last page of the wizard, the create-content action is being called with a JSON as parameter. 
Now take a look at these two JSON parts, both from different selections in the task manager blueprint wizard:

{"spaceKey":"TEST","contentBlueprintId":"c7ecab94-da49-4764-8cc7-d66c3b2e932d","contentTemplateId":"","contentTemplateKey":"team-task-report-template","title": ...}
{"spaceKey":"TEST","contentBlueprintId":"c7ecab94-da49-4764-8cc7-d66c3b2e932d","contentTemplateId":"","contentTemplateKey":"location-task-report-template","title": ...}


Notice that the contentBlueprintId stays the same, the contentTemplateKey is altered. Same should apply when you create pages from the advanced blueprint tutorial.

Summed up, what is actually happening is already described over here: LINK
The only difference is how you choose between the templates. And that is all up to you.

vandyke November 11, 2015

Hello @Patrick Masopust and thank you for your reply. do you know how to manage to select template as blueprint lookalike and not like dropdown menu? thank you.

Patrick Masopust November 11, 2015

You would need to modify the soy template. Atlassian is using an ordered list to display the template items. Take a look at the element inspector of your favorite browser to get an idea about how they do it. Hint: it's a tiny bit of HTML & CSS, using the right classes on your elements.

TAGS
AUG Leaders

Atlassian Community Events