• Aucun résultat trouvé

Custom Page Layouts

Dans le document Practical SharePoint 2010 Branding and (Page 134-137)

SharePoint Publishing Page Layouts are available only with SharePoint Server Standard or Enterprise.

Publishing cannot be enabled in SharePoint Foundation 2010. To create publishing pages, you need to enable the Publishing Infrastructure Site Collection Feature and the SharePoint Publishing Site Feature.

There are two main types of Page Layout Content Types: article pages and welcome pages. There are four unique page layouts within the Article Page Content type:

• Body only: This page layout includes a title, page content field control, and a roll-up image field control. You would use this for articles that are straight content and do not need additional images or links.

• Image on left: This type of page layout includes a title, page image, and caption on the left, article date, byline, page content, and rollup image. You would use this type of page layout for most news articles or announcements.

• Image on left: This type of page layout includes a title, article date, byline, page image and caption on the right, page content, and rollup image. You would use this type of page layout just like the image on the left page layout.

• Summary links: This type of page layout includes a title, article date, byline, summary links on the right, page content, and rollup image. You would use this type of page layout for articles that need additional links to support the content.

The summary links might be useful for showing related news articles or links to documents for that particular news article.

The second type of Publishing Page Layout, the welcome page, includes nine different layouts. The first four listed below are used for landing pages or content pages with multiple web parts:

• Blank Web-Part Page: This type of Page Layout includes a title, Page Content field control, and eight web-part zones. This page layout would be used to add a variety of web parts on the page in many different layout configurations.

• Splash: This type of page layout includes a title, page image, two summary links web parts embedded in the page, and three empty web-part zones on the bottom.

This page is unique as it includes some custom CSS within the page layout to hide the left navigation and remove the left margin in the content area. This page layout is useful on landing pages where you really need to use the horizontal space.

• Summary Links: This type of page layout includes a title, page image that is floating on the left side of the page content area, two summary links web parts embedded in the page, and three empty web-part zones at the bottom. Like the splash page, the left navigation has been hidden. This type of page layout is used for a more advanced type of landing page.

• Table of contents: This type of page layout includes a title, page image that is floating on the left side of the page content area, a top web-part zone that includes a table of contents web part, and two empty web-part zones at the bottom. This page layout could be used as a landing page to summarize content within its own site collection. However, in my opinion the OOTB table of contents web part does a poor job of summarizing the type of content that lives below this top landing page. It mixes in site content and site navigation, instead of using one or the other.

This standard web part does not allow you to just show sites; it basically uses the content of the left navigation settings for the sub-sites below it.

These five welcome pages are used for custom search pages and results.

• Advanced search: Includes two top-left and right empty web-part zones and a bottom zone pre-filled with an advanced search web part.

• People search results: Includes the standard results page layout configuration with the people refinement web part in the left zone area and the people search core results web part within the bottom zone.

• Search box: One of the most basic page layouts. It includes only one web-part zone with nothing in it. You would use this page layout to add a search web part within this zone, to create something similar to the base search center page.

• Search results: The standard search center results page layout. This page includes a refinement web part in the left zone, a search statistics web part in the middle lower left zone, a search action link in the middle lower right zone, a related queries and people matches web part in the right zone, and in the bottom zone it includes a search core results, search best bets, top federated results, and search paging web part. You would use this search results page layout if you wanted to create a custom search results page with additional web parts and configurations.

• Site directory home: A bit unique page layout as it includes a multilined rich text comments field in the upper left, a contact details web part in the header zone, and three empty web-part zones on the bottom. A message is included on the page in edit mode that says, “This control depends on a Tabs list for its configuration, and is designed to work within an appropriate site template. To remove this control, edit the layout page.” This page could be used for migrated SharePoint 2007 sites that do not have the visual upgrade enabled. SharePoint 2007 included a site template called Site Directory that used a tabs list for the top navigation of the page. After some investigation, it only seems like you can create a tabs list within the search center site templates. The problem with this is that even when you create this page layout in your search center it will produce a page error, if you have the new v4 visual upgrade enabled. I would recommend that you simply hide this page layout as it doesn’t offer significant value to any new SharePoint 2010 sites.

As we saw in Chapter 4, page layouts can include a variety of different configurations. The OOTB blank web-part page layout provides a pretty good variety of zone configuration options, as shown in Figure 6-11. The nice thing about these web-part zones is that they have some custom JavaScript built in to them that prevents zone without web parts or content from taking up space on the page.

Figure 6-11. Web-part page layout zones

Note The page content control on the page is normally a lot taller, but to include the whole web-part page

layout zone items in Figure 6-11, I had to reduce the height of it. There is an inline style being applied that sets the

height to a min-height of 400px. This min-height is used only in edit mode.

Dans le document Practical SharePoint 2010 Branding and (Page 134-137)

Documents relatifs