ASP.NET 母版页与 SharePoint 页面布局模板
我的一个客户使用 SharePoint 来管理其网站,最近要求我使用 ASP.NET 为他们构建一个小型网站,然后他们将通过 SharePoint 来实现该网站。
我的 ASP.NET 技能处于中等水平,而且我完全没有使用 SharePoint 的经验。
我为网站创建了一个母版页以及各个页面,但客户告诉我他们还需要一个页面布局模板才能通过 SharePoint 查看和管理网站。
不幸的是我不知道这意味着什么。所以,我的问题是:
母版页和页面模板有什么区别?
这个页面模板是什么样的?换句话说,它是什么类型的文件,里面有什么样的代码?
预先感谢您提供的任何帮助!
A client of mine uses SharePoint to manage its websites, and recently asked me to build a small website for them using ASP.NET, which they would then implement via SharePoint.
My skills with ASP.NET are intermediate, and I have no experience at all with SharePoint.
I created a master page for the site, as well as the individual pages, but the client is telling me that they also need a page layout template in order to view and manage the site via SharePoint.
Unfortunately I have no idea what this means. So, my questions are:
What is the difference between a master page and a page template?
What does this page template look like? In other words, what type of file is it, and what kind of code goes in it?
Thanks in advance for any help you can provide!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
母版页定义了您网站的设计。它适用于该网站内的所有页面,但由场中所有 SharePoint 网站共享并使用不同母版页的应用程序页面除外。您可以通过查看 URL 来识别应用程序页面...它包含 /_layouts/(所有 SharePoint 站点共享的虚拟目录)。
当您在启用了发布功能的 MOSS 站点中创建新页面时,系统会要求您指定页面布局。例如:“文章页面右侧有图像”。每个页面布局都绑定到一种内容类型,在本例中为内容类型“文章”。每种内容类型都可以绑定多个页面布局。您可以在一篇文章中将图像放在右侧,将图像放在左侧,甚至可以没有图像。
内容类型定义了页面的元数据。例如,一篇文章有标题、描述、页面图像、文章日期……
页面布局存储在母版页库中。您可以为现有内容类型创建页面布局,也可以创建新的内容类型。
基本上,母版页定义了站点的外观,页面布局定义了页面的外观。创建页面布局的一种方法(最简单的方法)是使用 SharePoint Designer,您可以从 Microsoft 下载页面免费下载它。
您可以在网络上找到很多有关创建页面布局的信息。这可能是一个很好的起点: http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-publishing-page-layout-HA010174128.aspx
The masterpage is what defines the design of your site. It applies for all pages within that site, except for the application pages which are shared by all SharePoint sites in the farm and use a different master page. You can recognize the application pages by looking at the url... it contains /_layouts/ (a virtual directory shared by all SharePoint sites).
When you create a new page in a MOSS site that has the publishing feature enabled, you are asked to specify a page layout. For example: 'Article page with image on right'. Each page layout is bound to one content type, in this example the content type 'Article'. Each content type can have multiple page layouts bound to it. You can have an article with the image on the right, with the image on the left or even without an image.
The content type is what defines the metadata for the page. An article for example, has a title, description, page image, article date,...
The page layouts are stored in the Master Page Gallery. You can create page layouts for existing content types, or you can create a new content type.
Basically, the master page defines how your site looks like, the page layouts define how your pages look like. One way (the easiest way) to create page layouts is to use SharePoint Designer which you can download for free from the Microsoft download pages.
You can find a lot of information about creating page layouts on the web. This may be a good starting point: http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-publishing-page-layout-HA010174128.aspx