Thủ thuật Sharepoint 2010 part 08 pps

7 314 0
Thủ thuật Sharepoint 2010 part 08 pps

Đang tải... (xem toàn văn)

Thông tin tài liệu

Working with SharePoint Pages ❘ 45 Working with Web Parts Web Parts are specialized components that perform certain tasks. You can think of SharePoint Web Parts as building blocks for adding additional content and information to your web page. It’s one thing to add text to a page. It’s another to add additional content in the form of video and audio, lists, RSS feeds, and data compiled from throughout a SharePoint site. An exhaustive treatment of how they are used is beyond the scope of this chapter. This section provides a high-level overview of the process of adding Web Parts to the page and the general experience of working with them. Adding a Web Part From the Insert tab, you can easily add images, tables, links, Web Parts, and lists. Adding Web Parts to a SharePoint 2010 page is different than in previous versions. When you click the Web Part button on the Insert tab, a Web Part picker opens at the top of the page, just below the Ribbon, as shown in Figure 2-23. At the left is a filter tree for the list of Web Parts, organized by category. The middle pane displays the available Web Parts for the selected category, and the right pane contains informa- tion about the selected Web Part. After selecting a Web Part, you can choose the zone it should be dropped into using the Add Web Part to: dropdown (that is, if multiple zones are available). Click the Add button to insert the Web Part onto the page where the blinking cursor was left in a rich text field, or into a specific zone selected in the drop-down at the bottom of the right panel. FIGURE 223 Not all available Web Parts are displayed on the Ribbon. To see the full list of web parts that are available on the site, click the Web Part button. You can also upload a file directly from the Insert tab into a SharePoint library and create a link to the document on the page, all without leaving Edit mode. The new Reusable Content Web Part can be used for elements that are frequently reused when creating pages, such as a copyright line, a byline, or a quote. You can view all the reusable content configured on the site and open the list in which it’s contained to add new content for use later. 46 ❘ CHAPTER 2 the NeW aNd imProved User exPerieNce Another novel addition to the Ribbon is the capability to create a new list on the fl y directly from the Ribbon using the New List button. A pop-up window will open, from which you can choose your list template and give the list a name. The newly created list will appear on the page. Using the Ribbon to Work with Web Parts When a Web Part is selected on the page, a new contextual tab opens in the Ribbon. Depending on the Web Part selected, various options are available. For instance, inserting the new Media Web Part (from the Media and Content category) will open both the Options tab under the Web Part Tools header and another Options tab under the Media header (see Figure 2-24). The Media Web Part lets you add a Silverlight media player to the page to play audio and video clips. As you might guess, the Options tab under the Web Part Tools header contains options for working with the Web Part in general (such as opening its properties or deleting it), whereas the Media heading’s Options tab per- tains specifi cally to the selected Web Part. Not all Web Parts have a dedicated tab in the Ribbon, but they all will open the Web Part Tools Options tab. FIGURE 224 Many users familiar with older versions of SharePoint will also recognize the tool pane for working with Web Parts. Clicking the Web Part Properties button in the Ribbon will open the familiar tool pane along the right side of the screen, which contains options for working with the selected Web Part. You can change the Web Part’s title and description and chrome state (whether its title and border display), as well as other options specifi c to that Web Part. Working with SharePoint Pages ❘ 47 Overall, working with Web Parts in SharePoint 2010 isn’t very different from past versions. Some Web Parts will have additional options in the tool pane depending on the type of Web Part. Figure 2-25 shows the tool pane for the Shared Documents library Web Part. The Content Query Web Part, for example, enables you to aggregate content from your site based on its content types. It has many different options for configuring the query used to gather its content, something that other Web Parts do not need and therefore do not feature. This tool pane can also be accessed from the Web Part’s drop-down menu, which appears to the far right of the Web Part’s title. Click the drop-down arrow and select Edit Web Part to open the tool pane. FIGURE 225 A new option found on the tool pane for some Web Parts that wasn’t found in previous versions of SharePoint is the AJAX Options section. Expanding this enables you to use the Asynchronous Updates option for certain lists. For example, you may have asynchronous updates turned on if a Web Part is taking a particularly long time to load. Allowing asynchronous updates enables the rest of the page to load without waiting for the Web Part. It can finish loading after the rest of the page has been displayed, which makes for a better user experience. A few other options are also available for using asynchronous syncing, such as whether to allow manual and automatic refreshing of the Web Part, and defining the interval between each refresh. When working with List view Web Parts on a page, a section opens in the Ribbon called List Tools. These list tools are, in fact, the very same Ribbon tabs that appear when working with a list directly. In other words, you can perform any action in a list through its List view Web Part that you would if you had the list open on the screen. 48 ❘ CHAPTER 2 the NeW aNd imProved User exPerieNce As you can see, the interface for editing pages and working with Web Parts has been signifi cantly overhauled for SharePoint 2010, providing an intuitive way to work with various components of the page at once, usually without having to even leave the page in order to add images, media, text, and other Web Parts. These changes provide a much more pleasant experience for users and administra- tors alike, increasing productivity dramatically. Because many user-centric experiences have been revamped to more closely mimic the Offi ce client interface that users are already familiar with, they should have an easier time adapting to the changes. USING SITE TEMPLATES IN SHAREPOINT 2010 Suppose you are setting up several team sites in order for various groups to be able to work on proj- ects together. It’s been decided that each one of the sites will contain several custom lists and docu- ment libraries, all with custom columns set up, and that certain items will appear on the site’s home page, so that any new project site that is created looks the same. Instead of having to create every single project site from scratch, and build every list, library, and custom columns each time a new site is requested, you can create one version of the site that can be made into a template and reused any time a new site needs to be created. You can save just the site’s structure as a template, or you have the option to save any content built into the site as well, such as Web Parts added to a page, pictures and documents in a library, and items in a list. The process is essentially the same as the site template creation process in SharePoint 2007. Sites can be created, confi gured, and saved as reusable templates; and you can use the browser interface or SharePoint Designer to make changes to a site. However, one difference is that SharePoint 2010 automatically packages up site templates as solution fi les with . wsp extensions. A WSP fi le is actually nothing more than a CAB fi le. You can even browse the contents of a WSP fi le by appending . cab to the end of the fi lename on the desktop and opening it with Windows Explorer. Creating Custom Site Templates In technical terms, a SharePoint custom site template is based on an existing site, which was created from a SharePoint site defi nition. Basically, a site defi nition is SharePoint’s blueprint for creating the various types of sites that are available. In other words, when a site is created in SharePoint, the site is created following the instructions laid out in the site defi nition fi le. The site defi nition specifi es which features are activated on the site, which libraries and lists are initially available, and other components of the site. When you build a site to be used as a site template, you are adding to the set of functionality that makes up an out-of-the-box site. You can also remove functionality by deactivating features you aren’t going to use. You are never actually touching the site defi nition fi le, but rather modifying a site that was created based on it. The differences between the original, out-of-the-box site and the changes you have made is essentially what defi nes your custom template. One thing to be aware of is that any changes made to site defi nition fi les may ren- der site templates and existing sites based on that site defi nition useless. It’s gener- ally frowned upon to modify a site defi nition fi le in the fi rst place, but doing so after sites have been provisioned can cause havoc in your SharePoint environment. Using Site Templates in SharePoint 2010 ❘ 49 Saving a Template After you have built out your site, click the Site Actions menu and select Site Settings. Under the Site Actions header, click Save as Template. After fi lling in the File name fi eld, you can fi ll in the Template name fi eld (see Figure 2-26). The fi lename is how the solution fi le is displayed, and the template name appears as a template selection during the site creation process. Give the template a descrip- tion so users creating sites from the template will know what it should be used for. Optionally, you can choose to include content in the template, which will include all content from libraries and lists. FIGURE 226 Security is not maintained in templates, so any content you save in the template will become available to anyone who creates a site based on that template. Click OK to save the template. Not all sites can be saved as templates, however. For instance, if a site has the SharePoint Server Publishing feature enabled at the site or subsite level, then the option to save the site as a template is not enabled. When you saved a template in SharePoint 2007, it was saved in a Template Gallery. Because SharePoint 2010 saves site templates as solution fi les, site templates are now stored in the Solution gallery in the top-level site collection. You can access the Solution Gallery from the Site Settings screen by clicking Solutions, under the Galleries Header on the Site Settings screen. Because the template is stored as a solution, it can be activated and deactivated as needed from the Solutions Gallery. Site template solutions are automatically activated after they are created. If you need to deactivate a solu- tion, simply put a check in the box next to the solution name and click the Deactivate button in the 50 ❘ CHAPTER 2 the NeW aNd imProved User exPerieNce Ribbon. This will open a confirmation pop-up, warning that you will lose the capability of the solu- tion if it is deactivated, as shown in Figure 2-27. FIGURE 227 You can activate a feature using the same method, but clicking the Activate button instead of Deactivate. You will receive a warning on the Activate pop-up window warning that you should only activate solutions you trust. If you’re working with site templates you created yourself you know they are safe to use. Go ahead and click the Activate button again in the pop-up’s Ribbon to turn on the template. Its status will be listed as Active in the Solution gallery. Now the template is available to use in all subsites in that site collection. From within the Solution Gallery, you can down- load a copy of the template file to upload into other SharePoint 2010 site collections or even farms. Creating a Site from a Site Template Creating a site from a custom site template is identical to the normal site creation process. Any custom site templates that have been activated in the Solution Gallery will show up in the Blank & Custom category on the left. Select your custom site template from the available templates, give the site a name and URL, and you can begin creating sites from the template. Just as in SharePoint 2007, you can also customize which site templates are available during the creation process when building out a site based on the Publishing template. This is done from the Site Settings page. Under the Look and Feel header, click on Page Layouts and Site Templates. On this page, you can choose whether to allow any site template or only specify a select few. On a subsite, you can specify whether the subsite should inherit its available site templates from its parent site, or whether it should use a unique set of templates. The available page layouts section below the site template selection area also uses the same interface for selecting which page layouts should be available. Multilingual User Interface ❘ 51 List Templates Lists and libraries can also be saved as templates in exactly the same manner as site templates. From the List Settings page, click the Save as Template link to begin the save process. Just like saving a site template, you can give the template file a filename, a display name, and a description. You can also choose to include the list content, but lists do not retain security settings, so consider that before making any sensitive information available as a template to everyone. The only difference between the site template and the list template is that list templates are stored in the List Template Gallery instead of the Solution Gallery. They are, however, solution files that can be reused. When creating a list from a custom list template, look for your custom templates in the Blank & Custom category on the left side of the Create window. MULTILINGUAL USER INTERFACE Many multinational companies with offices spread across the globe may need to deploy SharePoint 2010 in the local language of each branch. Fortunately, SharePoint 2010 offers an easy way for admin- istrators to install language packs for various languages on the server farm, enabling the creation of new sites in a local language, and the interface of existing sites to be translated into the languages installed on the server. Installation and Configuration of SharePoint 2010 Language Packs Installing language packs is a fairly straightforward process. Both SharePoint Foundation 2010 and SharePoint Server 2010 have language packs available to install. SharePoint Foundation 2010 only needs the SharePoint Foundation language packs, but if you are running the full license of SharePoint Server 2010, you need to install both the SharePoint Foundation and the SharePoint Server language packs. Language packs for SharePoint 2010 can be downloaded from the Microsoft Download Center at http://www.microsoft.com/downloads. When downloading the language packs, you should create a unique folder for each, or at least pro- vide a unique name, as the names of the SharePoint Foundation language packs all share the same filename, meaning it’s possible that downloading one language pack can overwrite files of another. Every front-end web server will need a language pack installed for every language you want to use. To begin the installation, first launch the SharePoint Foundation language pack for the selected language. When you launch the language pack’s installation file, you’ll be presented with a license agreement. The installation interface is written in the language of the language pack you are install- ing, which may look confusing at first. However, the installation process uses a standard Windows interface. Check the box below the user agreement and click the Next button (keeping in mind that “Next” is written in the language pack’s local language). The language pack will install. Figure 2-28 shows the installation of a French language pack. . and Configuration of SharePoint 2010 Language Packs Installing language packs is a fairly straightforward process. Both SharePoint Foundation 2010 and SharePoint Server 2010 have language packs. install. SharePoint Foundation 2010 only needs the SharePoint Foundation language packs, but if you are running the full license of SharePoint Server 2010, you need to install both the SharePoint. working with Web Parts in SharePoint 2010 isn’t very different from past versions. Some Web Parts will have additional options in the tool pane depending on the type of Web Part. Figure 2-25

Ngày đăng: 02/07/2014, 12:20

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan