11.3. Exploiting SharePoint Controls

SharePoint Web sites use a number of Web controls on out-of-the-box Web pages. These controls, unlike Web parts, can't be directly inserted on the Web pages by using the SharePoint site user interface. SharePoint Designer provides many of these server controls in the Toolbox task pane for use on Web pages inside SharePoint sites. This section introduces you to the server controls available for use on SharePoint sites.

11.3.1. Working with SharePoint server controls

If you choose Insert SharePoint Controls More SharePoint Controls, you're taken to the SharePoint Controls section in the Toolbox task pane, as shown in Figure 11.12. There are four types of controls available: Data View Controls, Server Controls, Page Fields, and Content Fields.

While you may question the usability of many of the SharePoint server controls listed in the SharePoint controls section of the Toolbox task pane, you can use some of these controls in really intuitive ways. For example, just by inserting the CSSLink server control on a new Web page, you can associate it with the default CSS file being used for a SharePoint Web site.

Figure 11.12. SharePoint Controls in the Toolbox task pane

To use the SharePoint server control AspMenu to gain data from the PortalSiteMapDataSource, follow these steps:

  1. Create a new Web page in your SharePoint Web site and then open it in the Design view.

  2. Using the SharePoint Controls section in the Toolbox task pane, insert the PortalSiteMapDataSource and the AspMenu controls on the Web page.

  3. Select the AspMenu control on the Web page, and using the Tag Properties task pane, locate the DataSourceID property.

  4. In the Tag Properties task pane, select the ID of the PortalSiteMapDataSource as a value for the DataSourceID property of the AspMenu control.

  5. Save the Web page and then preview it in a browser. The AspMenu displays the navigation structure of the SharePoint site.

11.3.2. Using page fields

You can use the Page and Content fields only if you're working with Page Layouts in a SharePoint site based on the Publishing site template. The Publishing site template is available only with MOSS installations of SharePoint.

NOTE

For more on master pages and page layouts, see Chapter 13.

While working with page layouts in SharePoint Designer, you can insert page and content fields on the page layouts from the Toolbar task pane, as shown in Figure 11.13. The page fields display the columns defined in the content type associated with the page layout. If you have defined any custom columns in the content type associated with the page layout, those also appear in the Toolbox task pane.

NOTE

Content Types, introduced in WSS v3 and MOSS, define the nature and behavior of the content that can be stored in items. For example, the Document content type allows for creation of items that can store documents and related metadata. If you have multiple content types associated with a SharePoint list, you can create items based on these content types and then store them in a SharePoint list.

When these page fields are inserted in the page layout, they can be used on the publishing pages created by using the page layouts.

11.3.3. Using content fields

Content fields, like page fields, are columns that are defined in the content type associated with the page layout being modified in SharePoint Designer. While designing the page layout, SharePoint Designer allows you to insert these content fields at the location of choice. As in the case of page fields, the content fields, once inserted in a page layout, are available for use in the publishing pages created based on the page layouts for a SharePoint site.

Figure 11.13. Page and Content Fields in the Toolbar task pane

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.97.75