2009-06-26 8 views
0

VSeWSS 1.3からを使用して、カスタムリスト定義を 'Site'にスコープします。ListTemplate定義の一部としてカスタムASPXファイルをインストールします。

ファイル 'PrintForm.aspx' が正しく 下サーバーにインストールされている
<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> 

... \ 12 \ TEMPLATEの\特長...、しかしそれは予想URL まで表示されません。 http://localhost/site/lists/listname/PrintForm.aspxこのテンプレートを使用してリストテンプレートをインストールし、新しいリストインスタンスを作成した後。

(上記の)私のListDefinition.xmlファイル内の、および/またはタグに正しいプロパティがないと思われます。

+0

あなたの投稿のコードの一部が欠落しています、pls編集。 – Colin

+0

Duh、書式設定する前にコードセクション全体に跨っているのを忘れてしまった。 –

答えて

0

またの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> 

P.S.既存のリスト(VSeWSSに付属)をエクスポートするためにSharePoint Solution Generatorを試すと、完全な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" /> 
+0

Type属性の値は何ですか? –

+0

わかりません。あなたのフォームをリストに追加し、SSGを使用して必要なXMLをリバースエンジニアリングしてください。また、SPSourceは同じことをすることができます... – Colin

+0

また、これをチェックアウト:http://www.sharepointdevwiki.com/display/public/Creating+a+List+Template+within+a+Feature – Colin

0

は、私はあなたのウェブサイトのルートフォルダに表示するPrintForm.aspxを期待するときモジュール要素のURLは空白です。試してみてください:

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

また、ファイルタイプとしてGhostableの代わりにGhostableInLibraryを試してください。

最後に、PrintForm.aspxはフィーチャーのどこかに表示されますが、完全なパスは指定されていません。それが... \ 12 \ TEMPLATE \ Features \ YourFeaturesName \ MyListDefinition \ PrintForm.aspxにあることを確認します。 Path属性の値に基づいて、PrintForm.aspxは、Feature内のMyListDefinitionという名前のディレクトリに存在する必要があります。

関連する問題