質問

私はプロジェクトにWebテンプレートを作成しました。カスタムリストを作成するためのコードを追加した機能を作成し、イベント受信側を追加しました。これで、この機能をWebテンプレートに追加します。どうやってこれを追加しますか?Feature File SystemフォルダとコピーされたVisual Studio SharePoint機能ファイルをコピーしてWebテンプレートファイルシステムフォルダに貼り付けるだけです。その正しい方法はありますか?しかし、私は疑問に思っています。またはSharePoint機能ファイルのみが十分ですか?

役に立ちましたか?

解決

This article gives you step by step procedure for creating a full Web template. There is one step that also details how to add Features to the template http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx#associateion, as besides adding it as part of your project, you also need to specify it in the WebFeatures element or SiteFeatures according to its scope.

他のヒント

Yup in your element.xml file you can add following tag,

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <WebTemplate Name="SimpleSite" Title="Simple site" BaseTemplateID="1" BaseTemplateName="STS" BaseConfigurationID="0" DisplayCategory="Simple sites" />
</Elements>

Your project structure should look something like this,

enter image description here

I personally use WSP Builder which does the job for me, but if you don't know how to do it by yourself then I won't recommend yu using WSP builder straight away.

Here's tutorial for how to use WSP builder for creating a feature.

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top