|
3.4. Custom Web Part PagesAlthough you can combine individual Web Parts into a site, you may want to group individual Web Parts into a complex Web Part page. By implementing a Web Part page, you can display lists, charts, text, and images as a single Web Part component. Organizing related data and web pages eliminates the time and steps required for users to constantly access multiple web pages and data sources. For example, you can build a custom Web Part page that displays a customer's contact information, orders, and invoices. All three pieces of information will be grouped as a single Web Part control. Web Part pages can be used to:
3.4.1. Web Part GalleriesAny Web Parts that are available for you to add to your SharePoint Services team site are stored in Web Part galleries. Depending on how your site is configured, Web Parts can be stored in any of four galleries:
3.4.2. Creating a Custom Web Part PageThe easiest way to create a custom Web Part page is through the New Web Part Page form. After creating a page with the New Web Part page form, you can easily design the page in a web browser. To create a new custom Web Part page:
Figure 3-8 shows the New Web Part Page screen that you can use to create new Web Part pages and choose the template that your Web Part page uses:
Figure 3-8. Create a custom Web Part PageAfter you click the Create button, your newly created Web Part page opens in the design view. Figure 3-9 shows a Web Part page in design view. Depending on the layout you chose, you will have several Web Part zones in which you can drag and drop existing Web Parts from the Web Part list. The Web Part page has three Web Part zones (a header, a left column, and a body zone). Figure 3-9. Web Part page design viewFor example, you could drag and drop an image Web Part into the header zone to add a company's logo to your page. You could then add custom lists to the left column and 3.4.3. Modifying Your Web Parts Page in an HTML EditorMost Web Part page properties can be accessed and modified directly through a web browser. In some cases you may want to make advanced modifications to your Web Parts page. Web Parts pages are stored as ASP.NET (.aspx) files. Therefore, you can modify Web Parts pages with an HTML editor such as Microsoft FrontPage. Figure 3-10 shows a Web Part page opened in FrontPage. Using FrontPage to edit your SharePoint Services team site gives you more control over the information you choose to display, as well as how you display it. For example, you can:
Figure 3-10. Opening a Web Part in FrontPageYou can also add web controls (for example, counters, navigation controls, and applets) that cannot be added through the basic SharePoint Services web interface. To add a control to your page:
Once you have edited a page outside of WSS, any changes should automatically appear when you refresh your view of the site. 3.4.3.1 Creating customized data viewsImplementing the data view Web Part allows you create customized data views by connecting to any data source that generates XML (for example, SQL Server, XML files, XML web services, and standard SharePoint Services lists). Once you connect to a data source, you can drag and drop the data source onto a SharePoint Services page and customize the data view to display selected information in customized formats (for example, adding borders, filtering data, and sorting). 3.4.4. Create Your Own Web Parts ProgrammaticallyIn some cases, the functionality offered by existing Web Parts may not match the functionality you need for your site. If you use a design environment compatible with SharePoint Services such as Microsoft Visual Studio .NET, you can access all the features available to ASP.NET to create custom Web Parts that match your desired functionality. Programmatically you can:
The steps involved in creating a custom Web Part are beyond the scope of this book. |
|