Jul 07 2017 05:09 PM
Is there a way using the PnP provisioning engine, to apply configuration to all lists of a particular template type in a site? i.e. I have a specific configuration that will apply to all document libraries in a site. As far as I can see all list instances specified in the template file need a hard coded name.
It'd also be good to be able to specify if a list doesn't exist, it just skips over that bit instead of trying to create it.
Jul 09 2017 02:21 AM
You could create a extention to your pnp project which genericly changes the settings of your lists.
Jul 10 2017 11:31 AM
SolutionI would recommend a different approach.
Instead of trying to apply your changes with one call to the template, add a parameter to the template for the list name and use the parameter in the template element where it is attempting to apply the change.
Then use the site context to get all lists in the web site, test each one for its type (so you are only working on Document Libraries), and then apply the template to those that match your criteria, passing in the name of the "current" doc lib.
Basically, loop through all the lists in your site, calling applytemplate() multiple times, once for each doc lib you want to change.
Jul 23 2017 09:33 PM
Jul 23 2017 09:53 PM
Aug 03 2017 05:38 PM
Jul 10 2017 11:31 AM
SolutionI would recommend a different approach.
Instead of trying to apply your changes with one call to the template, add a parameter to the template for the list name and use the parameter in the template element where it is attempting to apply the change.
Then use the site context to get all lists in the web site, test each one for its type (so you are only working on Document Libraries), and then apply the template to those that match your criteria, passing in the name of the "current" doc lib.
Basically, loop through all the lists in your site, calling applytemplate() multiple times, once for each doc lib you want to change.