部署自定义内容类型、表单、cqwp 和 xsl
现在我有一个视觉工作室项目,其中包含我制作的自定义内容类型。 它还包含制作共享点解决方案 (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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 STSDev 创建解决方案包。
这应该有助于创建 WSP。 自定义表单、CQWP Web 部件和 .xls 文件也应该可以在项目中部署。
要部署 xslt,您的功能将有一个
然后它指向一个文件,例如
Web 部件:
现在该文件需要包含在解决方案manifest.xml。 这是由 STSDev 项目自动完成的。
例如,
实际架构为:
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
for the webpart:
Now that file will need to be contained in the solution manifest.xml. This is done automatically from the STSDev project.
e.g.
The actual schemas are:
Site
Solution
Feature
and a link to someone else with the issue
但是,您将表单和 .xsl 部署到文件夹结构中的哪个位置?
But where in the folder structure do you deploy the form and the .xsl to?
我已遵循您的指南,尽管它将 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
您需要停用/重新激活该功能。 这将为您提供与复制文件相关的任何错误消息。
You need to deactivate / reactivate the feature. This will give you any error messages that are associated with copying the file over.