Hi, I'm wondering if there's a way to specify "parent of the current page" when creating a URL to create a page from a template.
I know it's possible to specify the template and parent page by using this syntax:
Is there something I can use instead of "&fromPageId=ZZZZZZZZ" to specify that the new page from template should be created under whatever page the user is on?
This could help encourage use of the page templates so I would like to know if it's possible. Thanks in advance!
Hi @Michelle Rau , not sure if I'm late to the party but Add page macro from ServiceRocket's Linking for Confluence app creates a link on your page which, when clicked, is equivalent to clicking Create Page button, while at the same time can define the page that you would like to be the parent of the new page, even if it's on a different space.
Check out the documentation here (the function is under the Parent parameter)
Hope that helps!
try out this code snippets inside your macro:
## @Param PageID:title=Target parent page|type=int|required=false|desc=Select a parent page ID where created pages will be stored as childs. If empty, current page will be assumed.
## Set current page as parent, if not set by user
#if ( !$paramPageID)
#set ( $paramPageID = $content.id )
This is an interesting idea, to create a template page from the URL formatted with an assigned parent. My ask to understand would be, why are we using a URL instead of allowing the user to select the template which will automatically inherit the parent page?
Additionally, there is the Create from Template Macro which allows you to specify the template and then from a single click create that template within the parent page. Further information on this may be found at Create from Template Macro.
We look forward to hearing back.
Hi Stephen, I'm back from holidays and I should clarify my question.
1. The use case for using a URL to create a page from template: I can add this link to the sidebar with other space shortcuts, or any place where the "create from template" button cannot be inserted. (Long story short, this helped resolve a squabble between the "child page" and "page tree" fans, since the page tree view doesn't by default include a link to "create a child page." The "new child page" URL points to a specific template I want users to use instead of creating blank pages.)
2. Use case for specifying a specific parent: we are introducing some new forms/templates and we want all pages of the same type housed under the same parent, because that's how our users are browsing for them. For example, if someone wants to create a new page about a specific tool, that page should go under the "toolbox" page.
3. Use case for using a URL that specifies "under the parent page of this page": By default new pages are child pages "under" the current page. A URL like this could create a new page "next to" the current page, i.e. at the same level in the hierarchy.
I hope that helps clarify.
Not to complicate this question, but with that URL syntax, is it possible to create a page in space 1 from a template in space 2 (as long as they're both in the same Confluence wiki)?
Glad to hear you’re back from the holidays. Thank you for your additional clarification and use cases you have, they are very interesting and understandable.
An alternative to this would be to browse the marketplace for an app that may accommodate when you’re looking for. Here is a preset search within the marketplace for Atlassian Marketplace | Template Links.
While not a direct answer on how to remove the fromPageId requirement from the URL that you’re looking for, I do hope that these references prove helpful.
Thank you! Our current system is workable, I'm always trying to find ways to make it easier for users to put the pages in the right place. :-)
I did discover that it's possible to create a page in one space using the template in another. All that's required is the templateId and the destination spaceKey, for example,
This could possibly allow us to build a "template library" that could be used to create pages in different spaces, provided that the templates are self-contained.
Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events