部署自定义内容类型、表单、cqwp 和 xsl

发布于 2024-07-05 07:39:29 字数 417 浏览 8 评论 0原文

现在我有一个视觉工作室项目,其中包含我制作的自定义内容类型。 它还包含制作共享点解决方案 (wsp) 文件所需的所有文件以及生成此文件的脚本。

现在,我想做两件事。

首先,我想为内容类型创建一个自定义显示表单,并将其包含在我的解决方案中,以便在部署解决方案时自动部署它。 如何将其包含在我的解决方案中并使我的内容类型使用它?

其次,您可以使用 CQWP 查询该类型。 我考虑过导出它,添加更多常见的视图字段,然后修改用于呈现它的 XSL。 如何将其包含到我的解决方案中以便也部署它。 我知道一旦完成所有设置,我就可以导出 CQWP Web 部件,并将其作为一项功能包含在我的项目中。 但是 XSL 又如何呢?

期待看到您的建议,加油。

按照第一个答案中的描述进行操作。 工作起来就像一个魅力。

Right now I have a visual studio project which contains a custom content type that I made. It also contains all the necessary files for making a sharepoint solution (wsp) file and a script to generate this.

Now, I would like to do 2 things.

First, I'd like to create a custom display form for the content type and include it in my solution so that it is automatically deployed when I deploy my solution. How do I include this in my solution and make my content type use it?

Secondly, you can query this type with the CQWP. I've thought about exporting it, adding more common view fields, and then modifying the XSL that is used to render it. How do I include this into my solution so that it is also deployed. I know i can export the CQWP webpart once it's all setup and include it in my project as a feature. But what abuot the XSL?

Looking forward to see your suggestions, cheers.

Did as described in the first answer. Worked like a charm.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

蓝颜夕 2024-07-12 07:39:29

使用 STSDev 创建解决方案包。
这应该有助于创建 WSP。 自定义表单、CQWP Web 部件和 .xls 文件也应该可以在项目中部署。

要部署 xslt,您的功能将有一个

然后它指向一个文件,例如

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Yourfile.xslt" Url="Style Library" Path="" RootWebOnly="TRUE">
    <File Url="yourfile.xslt" Type="GhostableInLibrary" />
  </Module>
</Elements>

Web 部件:

<Module Name="myWebpart" List="113" Url="_catalogs/wp" RootWebOnly="FALSE">
   <File Url="myWebpart.webpart" Type="GhostableInLibrary" />
</Module>

现在该文件需要包含在解决方案manifest.xml。 这是由 STSDev 项目自动完成的。

例如,

<Resources>
    <Resource Location="SimpleFeature\Feature.xml"/>

实际架构为:

Site

解决方案

功能

以及其他有此问题的人的链接

Use STSDev to create the solution package.
That should help with creating the WSP. The custom form, CQWP webpart and the .xls file should also be deployable within the project.

To deploy the xslt, your feature will have an

<ElementManifest Location="mywebpartManifest.xml">

This then points to a files such as

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Yourfile.xslt" Url="Style Library" Path="" RootWebOnly="TRUE">
    <File Url="yourfile.xslt" Type="GhostableInLibrary" />
  </Module>
</Elements>

for the webpart:

<Module Name="myWebpart" List="113" Url="_catalogs/wp" RootWebOnly="FALSE">
   <File Url="myWebpart.webpart" Type="GhostableInLibrary" />
</Module>

Now that file will need to be contained in the solution manifest.xml. This is done automatically from the STSDev project.

e.g.

<Resources>
    <Resource Location="SimpleFeature\Feature.xml"/>

The actual schemas are:

Site

Solution

Feature

and a link to someone else with the issue

晌融 2024-07-12 07:39:29

但是,您将表单和 .xsl 部署到文件夹结构中的哪个位置?

But where in the folder structure do you deploy the form and the .xsl to?

め可乐爱微笑 2024-07-12 07:39:29

我已遵循您的指南,尽管它将 xslt 部署到 12 Hive 中的功能,但它并未将其放置在正确的样式库文件夹中

I have followed your guide and although it deploys the xslt to the feature in 12 Hive it does not place it in the correct style library folder

怪异←思 2024-07-12 07:39:29

您需要停用/重新激活该功能。 这将为您提供与复制文件相关的任何错误消息。

You need to deactivate / reactivate the feature. This will give you any error messages that are associated with copying the file over.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文