开发者

What is the difference between the "Path" and "SetupPath" attibutes on the Module element

So I have a SharePoint feature definition that deploys page layouts to a publishing site. The definition looks something like this:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Page Layouts" Url="_catalogs/masterpage" RootWebOnly="True">
    <File Path="Page Layouts\layout1.aspx" Url="layout1.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="True">
      <Property Name="Title" Value="Layout 1" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
    </File>
  </Module>
</Elements>

The Module element also can accept the attributes "Path" and "SetupPath." My understanding is that if these two attributes are omitted then SharePoint looks for layout1.aspx in the same folder as th开发者_运维知识库is feature, if Path is specified then SharePoint looks for the file in a path relative to this features' folder and if SetupPath is specified SharePoint looks for the file relative to the 14 Hive.

So is this basic understanding correct? Once the feature is activated and live on the site, would this layout page be stored or handled any differently had I specified Path or SetupPath? Would load time of the layout file be in any way affected?

Thanks, Greg


To extend on what ashish mentioned.

Path = path relative to WSS 12 hive Features\Feature folder

SetupPath = path relateive to WSS 12 hive Template folder.


Please check following documentation in SharePoint SDK: http://msdn.microsoft.com/en-us/library/ms434127.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜