Skip to main content
2 of 4
added 136 characters in body
variable
  • 4.4k
  • 13
  • 76
  • 139

How to provision file to all webs in site collection?

We have added a VS module and foll. is the elements.xml:-

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Module1" Url="Shared Documents" RootWebOnly="True" Path="Module1" >
    <File Url="Sample.txt" Type="GhostableInLibrary"/>
  </Module>
</Elements>

Since RootWebOnly=true, the file gets deployed only to the RootWeb. Now, if we remove this, then, still the file gets deployed only to root web.

  1. How to deploy this to all webs in the sitecollection?

  2. If we set url to http://serverurl:port/subsite and set RootWebOnly="True", then the file is not deployed anywhere.

variable
  • 4.4k
  • 13
  • 76
  • 139