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

How to get "blueprint page template id"? (from Confluence java framework)

Mauro_Cherchi May 28, 2015

Hi, I am trying to get the ID of a specific "blueprint page template" to be able to dynamically insert it in the macro "Create from template". 

This is the XHTML of the macro:

<ac:structured-macro ac:name="create-from-template">
    <ac:parameter ac:name="templateId">81887264</ac:parameter>
    <ac:parameter ac:name="buttonLabel">My template label</ac:parameter>
    <ac:parameter ac:name="templateName">81887264</ac:parameter>
</ac:structured-macro>


There is an object that can give me this information?
Something like TemplatesManager.getTemplateFromKey("key")?

I tried with "PluginAccessor", "PageTemplateManager", "SpaceManager" and "SettingsManager" but I was unable to retrieve the information from any of these.


Thanks!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Tim
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.
May 28, 2015

https://confluence.atlassian.com/display/DOC/Create+from+Template+Macro

for a blueprint, it maybe enough to have the blueprintModuleCompleteKey

However, there is also a BlueprintManager (com.atlassian.confluence.plugins.createcontent.actions) which you could try: https://maven.atlassian.com/service/local/repositories/atlassian-public/content/com/atlassian/confluence/plugins/confluence-create-content-plugin/4.0.24/confluence-create-content-plugin-4.0.24-sources.jar

Mauro_Cherchi May 28, 2015

Perfect! blueprintModuleCompleteKey works great! Thanks!

TAGS
AUG Leaders

Atlassian Community Events