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 