I need to create nested sub-pages upon clicking a button in parent page. I tried using REST Endpoint but I was getting 403 forbidden. I have also tried using custom event listener and set the event as PageUpdateEvent.
Whenever I click update button in main page the script is being executed but on clicking the button in parent page, the script is not being executed and sub-pages are not being created.
Please let me know how to implement this.
Thanks in advance :)
I see two answers with built in features that might help!
1. You might try the Confluence smart button macro! They have some templates of automations you can do, like creating a new page, with/out a template, adding labels. There you can specify the parent page if it's always in the same space. Check it out, it might fit your use case! These are a bit limiting and do display on the page.
2. Confluence automation is great when you want to manually trigger actions from a page. This also allows you to set permissions for who can trigger the action and what space(s) they apply to. I tested this and it worked quite well! See screenshots below:
Thanks a lot @Harrison Ponce This helps.
In my case I need to create some complex structure.
And the name for the Sub-pages must match with specific content in the main page.
For instance, if I have a table with two columns, I need to create sub-pages for every item in the first column; and for every item in second column, I need to create a second level sub-page under the respective sub-pages created for the 1st column.
So, I thought of extracting the page content and create nested sub-pages upon a button click using custom event listeners.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahh I see. This might be pushing the limits of what Confluence can do on its own and would require either a Forge app or some fancy scripting. May be helpful to look at if this can be accomplished differently using Jira integration or some other mechanism!
Happy to chat more about this interesting use-case if you would like to connect on a call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kousalya S and welcome to the community.
You can just click Plus, select Page and create a new child page.
Pages are saved/published/updated on individual basis.
Perhaps you can elaborate more about what you're trying to achieve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Kristian Klima I am trying to automate the process. I need to create nested sub pages on a button click (which was added using HTML Macro) using groovy script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kristian Klima , how can I change where this child page appears. The default setting has it appear at the buttom of the parent page. Can I reverse that (i.e. have it appear at the top)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sonia Jouini and welcome to the community.
Just literally drag and drop the page where you want it to have - if you drop it onto another page, you create a child / parent page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, I am aware of that. but it has become a pain to do this every time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.