Skip to content
Discussion options

You must be logged in to vote

I would keep the shape Adam suggested: build one ProvisioningTemplate, extract only the pages you need into that same template, then apply the template once.

The reason is that ClientSidePageContentsHelper.ExtractClientSidePage(...) takes the existing ProvisioningTemplate as an argument and appends the extracted page into template.ClientSidePages. So page-by-page extraction does not have to mean “one template engine run per page” or “one template per page”; it can be:

var template = new ProvisioningTemplate();
var helper = new ClientSidePageContentsHelper();

foreach (var pageName in listOfWantedPages)
{
    helper.ExtractClientSidePage(
        sourceContext.Web,
        template,
        …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Magnus-K-work
Comment options

Answer selected by Magnus-K-work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants