如何使用功能上传发布页面?
我正在尝试创建一个功能来在“页面”库中上传新的发布页面,但它无法按照我想要的方式工作。 如果我使用 SharePoint Designer 看到该库,则会出现我的发布页面,但如果我使用 Internet Explorer,则不会出现。
在该功能中,我配置属性:ContentTypeId、ContentTye、Author、Title、FileRef、FileDirRef、FileLeafRef、FileType、LinkFilenameNoMenu、LinkFilename 和 DocIcon。 在之前的功能中,我遇到了同样的问题,并通过放置 ContentTypeId 属性来解决。 在这种情况下,我不知道错误到底在哪里。
I'm trying to make a feature to upload a new publishing page in "Pages" library but it doesn't works the way I want. If I see the library using SharePoint Designer my publishing page appears, but it doesn't if I use Internet Explorer.
In the feature I configure the properties: ContentTypeId, ContentTye, Author, Title, FileRef, FileDirRef, FileLeafRef, FileType, LinkFilenameNoMenu, LinkFilename and DocIcon. In previous features, I faced the same problem and it was solved putting the ContentTypeId property. In this case, I don't know exactly where is the error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我使用以下代码根据页面布局创建发布页面,该页面布局被认为已配置并基于内容类型。 该代码在您的功能的 FeatureActivated 事件处理程序中运行:
I use the following code to create a publishing page based on a page layout which is considered to be already provisioned and based on a content type. The code runs in the FeatureActivated event handler for your feature:
请参阅这些链接
http://blog.mastykarz.nl/provisioning-发布页面功能声明标记/
Refer these links
http://blog.mastykarz.nl/provisioning-publishing-pages-features-declarative-markup/
我有类似的问题。 事实证明,我必须发布上传的文件才能使其可见。
I had a similar problem. It turned out i had to publish the uploaded file to make it visible.
我有与 Tudor 类似的解决方案,我将将该代码发布到以防万一:
...获取 SiteCollection (SPSite)...
I have similar solution as Tudor, I´ll publish that code to just in case:
...get SiteCollection (SPSite)...