将网页添加到空白共享点站点定义
我对 Sharepoint (2007) 完全陌生,所以请耐心等待。我想在创建新站点时自动创建 aspx 页面。这些页面将通过由母版页定义的选项卡链接到。我没有自定义站点定义,并计划将功能装订应用于开箱即用的空白站点定义。
通过我的研究,我认为您可以创建一个 Web 部件页面并将其转变为一项功能。然后我可以将其钉到空白站点定义中。问题是我还没有找到任何有关如何执行此操作的信息。所以我有两个问题:
- 如何创建一个仅是 aspx 页面的功能?
- 如何将此功能钉到空白站点定义中?
我发现有人在这里问同样的问题: 如何将 Web 部件页面添加到网站定义? 我读了第一个回复,但它有点超出了我的理解,我不知道它是否真的回答了我的问题。
非常感谢!
I am totally new to Sharepoint (2007) so please bear with me. I would like to automatically create aspx pages when a new site is created. These pages will be linked to through tabs which will be defined by a master page. I do not have a custom site definition and was planning to apply feature stapling to the out of the box blank site definition.
Through my research, I think you can create a web part page and turn this into a feature. I can then staple this to the blank site definition. The problem is I haven't found any information on how to do this. So the two questions I have are:
- How do I create a feature that is just an aspx page?
- How do I staple this feature to a blank site definition?
I found one person asking the same question here: How to add a web part page to a site definition?
I read the first response but it sort of goes over my head and I don't know if it really answers my question.
Thanks so much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个问题的答案取决于您指的是应用程序页面还是内容页面。它们各有优点:应用程序页面很好,因为它们可以运行自定义服务器端代码,而内容页面很好,因为(例如)它们可以由用户自定义,但默认情况下限制可以运行哪种代码跑步。
有关这两种类型之间的功能和限制差异的详细讨论,请查看 Windows SharePoint Services SDK 并查看名为“应用程序布局页面类型" 和 "内容页面类型。"
至于装订,它比向站点定义的 onet.xml 文件添加新功能非常简单且更灵活。这篇文章似乎对替代方案做了很好的概述。不过,您可能想要复制空白站点定义,将其重命名,然后在您的工作中使用该副本。
内容页面的功能
为此,您需要三种类型的东西:
WebPartZones
但还没有实际 Web 部件的 Web 部件页面的外壳。您的功能的文件夹结构将如下所示:
Feature.xml:
Elements.xml
Page.aspx
WebPartPage.aspx
如果您以这种方式配置功能,您应该能够在该结构中部署网站内容页面。
另外,我强烈推荐 Ted Pattison 的Inside Windows SharePoint Services一书。它详细介绍了该主题,包括网站内容页面的重要安全方面。它很容易值得购买价格。
The answer to your first question depends on whether you mean application pages or content pages. They each have their advantages: application pages are good in that they can run custom server-side code, and content pages are nice because (for example) they can be customized by users, but by default are restricted in what kind of code can be run.
For a pretty good discussion on the differences between the two types in capabilities and restrictions, check out the Windows SharePoint Services SDK and look at the topics called "Application _layouts page type" and "Content page type."
As for stapling, it's pretty easy and more flexible than adding new features to a site definition's onet.xml file. This article seems a pretty good overview of the alternatives. You might want to make a copy of the blank site definition, rename it, and then use that one in your work, though.
Features with content pages
You'll need three types of things for this:
WebPartZones
defined but no actual web parts (yet).Your feature's folder structure would look something like this:
Feature.xml:
Elements.xml
Page.aspx
WebPartPage.aspx
If you configure your feature in that way, you should be able to deploy site content pages within that structure.
Also, I highly recommend Ted Pattison's Inside Windows SharePoint Services book. It covers this topic in much detail, including the important security aspects of site content pages. It's easily worth the purchase price.