Forum Discussion
Copy site page with quick links to another site
Hi gjayne84,
Did you find a solution / workaround to your question? I have exactly the same issue.
Thanks a lot!
- gjayne84Nov 08, 2022Brass Contributor
I did find a solution in the end but it took a few extra steps in the flow. After the flow creates my new site now I have the following actions below:
The varSiteURL holds the name of the newly created site. The first action above copies the home page from my template site to the new site. To be honest, it was quite a while ago I did this so looking at it now I'm not sure why I've copied the home page rather than just got the metadata from the existing home page. It may be that you don't need the home page copy action.
The Get file metadata action is used to provide the ItemId dynamic data used in the next step to check out the home page.
I then use the action below to edit the home page so I could change the quick links etc:
In order to get the above code for the Body I opened the home page of my template site and then opened the dev tools in Crome or Edge. You then need to edit the page and republish (you don't have to make any changes). Once you've done this look for SavePage in the Network tab of the dev tools pane:
Click View Source as circled above and you'll get the code to paste into the flow action. From there then you just have to work out which bits need to be dynamically set in your flow i.e. quick link URLs etc.
I hope this helps but if you need anything else give me a shout.