Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 作为ListTemplate定义的一部分安装自定义ASPX文件_Sharepoint_File_List_Templates_Module - Fatal编程技术网

Sharepoint 作为ListTemplate定义的一部分安装自定义ASPX文件

Sharepoint 作为ListTemplate定义的一部分安装自定义ASPX文件,sharepoint,file,list,templates,module,Sharepoint,File,List,Templates,Module,我正在使用VSEWS 1.3创建一个自定义列表定义,范围为“站点” <Elements Id="8924acef-84ef-4584-ade4-e3eaeb8df345" xmlns="http://schemas.microsoft.com/sharepoint/"> <ListTemplate Name="MyListDefinition" DisplayName="MyList" Descrip

我正在使用VSEWS 1.3创建一个自定义列表定义,范围为“站点”

    <Elements Id="8924acef-84ef-4584-ade4-e3eaeb8df345" xmlns="http://schemas.microsoft.com/sharepoint/">

  <ListTemplate Name="MyListDefinition"
                DisplayName="MyList"
                Description=""
                BaseType="0"
                Type="10888"
                OnQuickLaunch="TRUE"
                SecurityBits="11"
                Sequence="410"
                Image="/_layouts/images/itgen.gif" />

  <CustomAction
    Id="MyList.Print"
    Location="Microsoft.SharePoint.StandardMenu"
    GroupId="ActionsMenu"
    Title="Print MyItem"
    Description="Print Empty copies of this form."
    RegistrationType="List"
    ControlAssembly="MyList, Version=1.0.0.0, Culture=neutral, PublicKeyToken=de6e0316a726abcd, processorArchitecture=MSIL"
    ControlClass="MyList.PrintActionMenu" />

  <Module Name="ActionPages" Url="">
    <File Url="PrintForm.aspx" Type="Ghostable" Path="MyListDefinition\PrintForm.aspx" />
  </Module>
</Elements>

“PrintForm.aspx”文件已正确安装在服务器上的..\12\TEMPLATE\Features…下,但在安装列表模板并使用此模板创建新列表实例后,它不会显示在所需URL下


我怀疑我的ListDefinition.xml文件(如上所示)中的和/或标记中缺少正确的属性。

您还应该有一个schema.xml,schema.xml中应该有如下内容:

<Forms>
  <Form Type="DisplayForm" Url="DispForm.aspx" WebPartZoneID="Main" />
  <Form Type="EditForm" Url="EditForm.aspx" WebPartZoneID="Main" />
  <Form Type="NewForm" Url="NewForm.aspx" WebPartZoneID="Main" />
  ...... your form here
</Forms>

...... 你的表格在这里
另外,请尝试使用SharePoint解决方案生成器导出现有列表(随VSEWS提供),它将为您提供完整的xml定义。你可以把它作为参考

p.p.S.在评论中发布的链接中指出,文件应在功能中注册,如下所示:

<ElementFile Location="GenericList\schema.xml" />
<ElementFile Location="GenericList\DispForm.aspx" />
<ElementFile Location="GenericList\EditForm.aspx" /> 
<ElementFile Location="GenericList\NewForm.aspx" /> 
<ElementFile Location="GenericList\AllItems.aspx" />

如果它在任何地方,当模块元素的Url为空时,我希望PrintForm.aspx显示在网站的根文件夹中。试试这个:

  <Module Name="ActionPages" Url="lists/listname">    
        <File Url="PrintForm.aspx" Type="GhostableInLibrary" Path="MyListDefinition\PrintForm.aspx" />  
  </Module>

另外,请尝试使用GhostableInLibrary而不是Ghostable作为文件类型


最后,您提到PrintForm.aspx确实出现在功能中的某个地方,但没有给出完整的路径。确保它位于…\12\TEMPLATE\Features\YourFeaturesName\MyListDefinition\PrintForm.aspx中。根据Path属性的值,PrintForm.aspx需要位于功能中名为MyListDefinition的目录中。

文章中的一部分代码缺失,请编辑。Duh,在格式化之前忘记跨越整个代码部分。Type属性的值是多少?不确定。将表单添加到列表中,然后使用SSG对所需的xml进行反向工程。另外,SPSource也可以这样做……另外,请查看以下内容: