Chapter 6: Building Web Sites


So far you have seen how to install both WSS and MOSS, and in last chapter you learned how to configure the portal site in MOSS. But the fun does not stop there. There are lots of other interesting things you can do in your new SharePoint environment, and they all build on WSS sites.

This chapter will tell you a lot more about creating sites for both MOSS and WSS. Before you read this chapter, you should have a pretty good understanding of the basic administration. Be sure to read Chapters 3 and 5 before reading this chapter because this will make it much easier to understand the information presented here.

WSS Sites

The web sites you create with WSS 3.0 are similar to the ones in WSS 2.0, but there are important differences! They now have a lot of new features that only were found in SPS 2003 before. For example, you can do a global search that is security trimmed (users only see objects they are allowed to see), and its content can be filtered using audiences. This means that a user now has a much more consistent experience when moving from a WSS site to a MOSS site because the sites behave in the same way. It is true that MOSS sites have a lot of more advanced features than WSS sites, but the basic features are shared between them both. Following is a list of some of the new features in WSS 3.0 (see Figures 6-1 and 6-2):

image from book
Figure 6-1

image from book
Figure 6-2

  • q Breadcrumb trails: You will directly see where in the site hierarchy you are now. You can also click on any of the breadcrumbs to jump back to a previous location (see Figure 6-1).

  • q Persistent Quick Launch bar: If you open a list in WSS 3.0, it will still show you the Quick Launch bar. Compare that to WSS 2.0 where the Quick Launch bar was replaced with action links specific to the current list, which made it more cumbersome to quickly open another list or library in that site (see Figure 6-1).

  • q Navigation: You can display the subsites under the current site. You can also configure the Quick Launch bar to display a tree view of the site hierarchy that includes all lists and libraries, including any folder, plus all subsites (see Figure 6-1).

  • q Recycle Bin: All deleted list items or document items will be stored in a Recycle Bin located at the bottom of the Quick Launch bar. The user who deleted the item can simply open the Recycle Bin and restore this item.

  • q Outlook 2007 integration: Using the Outlook 2007 client, a user can create a local copy of SharePoint libraries and lists for offline usage. This is true for most list types, except, for example, Survey lists. The information copied to Outlook 2007 is editable. Any change you make is replicated back to the SharePoint source when your computer goes online (see Figure 6-2).

  • q RSS Feeds: Using the Really Simple Syndication (RSS) technique, you can configure Outlook 2007 and Internet Explorer 7.0 to retrieve updates of SharePoint lists. Using RSS, you will always know when a SharePoint list or library is updated, without the need to download each new list item or document to Outlook.

WSS Default Site Templates

The site templates that are installed by default when deploying a WSS 3.0 server are similar to the ones found in WSS 2.0, except for the many new cool features mentioned above. The idea with WSS is still the same as before: to offer a place where a team can share documents, contacts, and other types of information. True, you can build a simple intranet, using WSS alone, but it will not have the content management features that MOSS offers. But the again, WSS 3.0 is free, and MOSS 2007 is not, so you may be forced to go with WSS for economic reasons. So, let's look at the site templates that come with WSS 3.0:

  • q Team Site: This is the standard site template, with some precreated lists and libraries: Shared Documents, Announcements, Calendar, Links, Tasks, and Team Discussions.

  • q Blank Site: The same type of site as a team site, except that there are no precreated lists or libraries. The only thing displayed on this "blank site" is an image Web Part that shows the WSS logotype.

  • q Document Workspace: This is a special type of site that mostly is used by a team to collaborate on a specific document. Mostly, this type of site is created using the quick menu for a document or directly from within MS Office applications.

  • q Wiki Site: This is a new site template for WSS 3.0; use this template to create sites where users can read and add information in a very informal way. Common uses for wiki sites are capturing brainstorming ideas, building a support center knowledge base, and building a general knowledge base. (See Figure 6-3.)

    image from book
    Figure 6-3

  • q Blog: A blog is a site where you share your ideas, comments, and often tips and tricks. Usually, there is a single person who is responsible for a blog site, but it may also be used by teams that want to share information with other users.

  • q Basic Meeting Workspace: This type of site is normally used to capture details and information for a meeting. It contains four precreated lists: Objectives, Attendees, Agenda, and Document Library. This type of site is called a workspace, and it is still a common WSS site. This site is most commonly configured when booking a meeting using Outlook 2003 or 2007, although you can create it manually.

  • q Blank Meeting Workspace: This is similar to the basic meeting workspace, except that it only has one precreated list: Attendees. Use this template when you want to create all lists manually. The Attendees list is special, since it will automatically be populated by all users invited to an Outlook meeting.

  • q Decision Meeting Workspace: This site template contains the following precreated lists: Attendees, Objectives, Agenda, Document Library, Tasks, and Decisions.

  • q Social Meeting Workspace: This template has three pages created by default: Home, Discussion, and Photos. This site template also contains these lists: Attendee, Directions, Things to Bring, Discussion Board, and Picture Library. It also displays an image Web Part. This type of site is often used to discuss social events, such as Christmas parties and Birthday celebrations.

  • q Multipage Meeting Workspace: This site template is very similar to the social meeting workspace, with its three pages. The difference is the number of lists: This template only has Attendees, Objectives and Agenda. Two of the three pages are empty, and you are supposed to add lists to them.

WSS Custom Site Templates

All of the default site templates can be modified by a user with the proper permission, for example, an owner or a designer. What you can do depends on how you modify the site. You have two basic choices: using the web browser (e.g., Internet Explorer) or using the SharePoint Designer program. Besides these two options, you can also build your own site definitions, but that is a more advanced topic that you will learn more about in Chapter 12. Following is an introduction to how the default site templates work under the hood:

Whatever changes you make, regardless of whether you use the web browser or SharePoint Designer, will be stored in SharePoint's content database. There will be no files updated outside that database. So how does it work? To begin with, all sites are defined by a number of Active Server Pages (ASP) and Extensible Markup Language (XML) files, stored in the file system on the SharePoint server. For example, every WSS site is defined by the files in this folder:

     <disk>:\Program Files\Common Files\Microsoft Shared\web server↩     extensions\12\TEMPLATE\1033\STS 

STS stands for SharePoint Team Services (from the first version of WSS). Yes, it is curious that Microsoft still sticks with the old abbreviation, but just accept the fact that anytime you see STS, you should think WSS!

There are also a number of files that define the STS site that you will find in the following folder:

     <disk>:\Program Files\Common Files\Microsoft Shared\web server↩     extensions\12\TEMPLATE\GLOBAL 

This last location consists of files that define common characteristics of a number of site definitions, not only STS. In previous versions of SharePoint, every site definition contained its own set of files and a folder you could find in the GLOBAL directory, but in SharePoint 2007 Microsoft has created a global folder structure for them. Only the definitions that are specific to a given site definition will be listed in their own site definition folder.

So, the site definition controls the characteristics of a site. You apply a customization of that site, and that is where site templates comes in. A site template adds the look and feel of the site definition, including pre-created lists and libraries, and colors. But it does not stop there. The navigation elements, the top menus, logotypes, and so on, are defined by something called a Master Page, which is an ASP.NET 2.0 feature. In Chapter 12 you will learn more about how to use Master Pages for your WSS sites. To summarize all this, the way a WSS site looks and works is decided by:

  • q The site definition files: Stored in the file system, these define the characteristics of the site, such as what lists that are available, and their features and functionality.

  • q The site template: This controls the overall look and feel, including what lists and libraries that will be pre-created.

  • q The Master Page: This controls the navigation, the menus, the Quick Launch bar, and the logotype.

And it does not stop here. You can create your own site template by customizing any existing site. So, the question is: Where will your customization be stored? The answer is: in SharePoint's content database! What will it contain? The answer: the differences between the basic site definition and your customizations, no more and no less. If the basic site definition gets deleted, your site will not work, since it only contains the things you changed in the site.

To create your own site template, you simply open an empty site and customize it, and then save it as a template. For example, you can add new listings, change the color theme, and add more Web Parts to the site's home page. The important thing to remember is to start with a site that has the basic functionality you want to use. For example, to customize a site used for meetings, you should start by using a Meeting Workspace template. Use the steps in the following Try It Out to create a site template, based on a Team Site template:

Try It Out Create a Custom Site Template

image from book
  1. Log on to the WSS server as an administrator.

  2. Use Internet Explorer and open any WSS site, for example: http://srv1/SiteDirectory/IT.

  3. Click Site Actions image from book Create image from book Sites and Workspaces.

  4. On the next page, enter these values to create a subsite under IT based on the Team Site template, which you then can use for your customization:

    1. Title: Site Dummy.

    2. Description: Site used to create a custom site template.

    3. URL name: Add SiteDummy to the existing URL link, that is: http://srv1/SiteDirectory/IT/SiteDummy.

    4. Make sure to select the Team Site template (on the Collaboration tab).

    5. Click Create to save and create the SiteDummy site.

  5. The new site is displayed. It is time to customize it. For example, add some lists and a library. Then show them on the site's home page and remove some of the other lists. Finally, change the color by selecting another theme for this site:

    1. Click Site Actions image from book Create image from book Document Library. Give it the name Protocols, and click Create.

    2. Click Site Actions image from book Create image from book Contacts. Give it the name Customers, and click Create.

    3. Click Site Actions image from book Create image from book Project Tasks. Give it the name Project Tasks, and click Create.

      You now have one new document library, and two new lists. Let's show them on the home page for the site:

    4. Click on the breadcrumb link SiteDummy to open the home page for the site. Then select Site Actions image from book Edit Page. This page is now open in edit mode.

    5. Remove the Announcements, the Calendar, and the Image Web Part, like this: Click edit on the right side on the Web Part to be deleted, then select Delete and then OK. Note that this will not delete the actual list; it will only remove its Web Part from this page. Repeat this for all three of these Web Parts.

    6. Time to add the new lists you created: On the left Web Part zone, click Add a Web Part. Locate and check the Protocols library, the Customers list, and the Project Tasks list, then click Add. All three will now show up. Now, click Exit Edit Mode in the upperright corner of the page.

      The final customization is to change the colors of this site. You will use the Themes feature for this:

    7. Click Site Actions image from book Site Settings image from book Site theme (in the Look and Feel section), then select Belltown and click Apply. Your site will now have a greenish look.

  6. Click on the SiteDummy breadcrumb link to open the home page for this site. Time to save it as a site template: Click Site Actions image from book Site Settings image from book Save site as template. Enter the following:

    1. File Name: GreenTemplate.

    2. Template Name: Green Template.

    3. Template Description: My first site template.

    4. Include Content: For this demo leave it unchecked. You can use this check box if you want to store current content in the site template. Note that the maximum size for this content is now 500 MB. (In WSS 2.0 the limit was 10 MB.)

    5. Then click OK to save this template.

      The customized site template is now created and ready to be used. So, let's test it by creating a new site and applying this template:

  7. Click Site Actions image from book Create image from book Sites and Workspaces, then enter these values:

    1. Title: Test Site.

    2. Description: Test site.

    3. URL name: Add test to the existing URL link, that is: http://srv1/SiteDirectory/IT/SiteDummy/test.

    4. Make sure to select the Green Template template (on the Custom tab).

    5. Click Create to save and create the site. Inspect the new site. Verify that you have the exact same lists, libraries, Web Parts, and colors, as the custom site template. Easy, right?

image from book

There are some natural questions now, like these:

  • q "Where can this custom site template be used?" Answer: Everywhere in this site collection!

  • q "What happens if I change the SiteDummy site that was used to create the custom site template?" Answer: Nothing! There is no relation between the site used to create the customized template, and the template itself. And this can, of course, be a problem in some situations, for example when you have created a number of sites based on the customized template and then you need to make a small change, such as adding a list. It can't be done; you will have to update each and every one of those existing sites manually.

  • q "Can I edit the actual site template?" Answer: No. There is no way to change a custom site template once it is created. The only thing you can do if the template is wrong is to create a new one. If you want to use the exact same template name, you must first delete the existing template. You do this by using the Site Template list, as discussed in the next section.

  • q "Can I somehow change existing sites, based on the custom site template?" Answer: No.

  • q "Can existing sites be configured to use another site template?" Answer: No.

So, creating a customized site template is very easy, but it has a drawback, and you must be aware of it!

Moving Custom Site Templates

Creating custom site templates is easy, but they only work within the site collection they were created in. However, you can copy custom site templates between site collections. The trick is to store a copy of the template outside SharePoint, on the file system, then import that file into the other site collection. It works fine, even if you have chosen to store list content in the template (See step 6d above). The general steps are:

  1. Go to the top site and open the site template gallery where the template is located.

  2. Save the template to a file on the file system.

  3. Go to the template gallery for the other site collection.

  4. Import that file to the first gallery.

The detailed steps are also quite straightforward and easy. To copy your site template, just follow the steps in the Try It Out below.

Try It Out Copy a Site Template to Another Site Collection

image from book
  1. Log on as a site collection administrator.

  2. Open the top site where the site template is currently stored.

  3. Choose Site Actions image from book Site Settings image from book Modify All Site Settings.

  4. Click Site templates. You will see a list of all site templates for the site collection. Note: if you don't see this link, you are not on top site of this site collection. If this is the case, click the link Go to top level site settings in the Site Collection Administration section.

  5. Click the name for the site collection you want to copy (for example, Green Template).

  6. Choose to Save, and select a folder to save the file in. Keep the file name (Green Template.stp) unless you want to change it, and click the Save button. Then click Close to close the dialog box.

  7. Open the top site in the other site collection. Make sure that you are logged on as a local administrator for the site.

  8. Choose Site Actions image from book Site Settings image from book Modify All Site Settings, and then click Site templates. You should now see all templates for this site collection.

  9. Click Upload. Use the Browse button to select the template file you saved in step 6; click Open and then OK. In the following form you can change the name, title, and description if necessary. When ready, click OK. The template is now copied to the site collection.

  10. Test your work by creating a new subsite in the site collection using the copied template. Everything should look exactly as it did in the first site collection.

image from book

Adding a Site Template to the Global Site Template Gallery

The templates you have been working with up to this point have all been limited to a given site collection. But how can you apply your custom site templates when creating a new top site, and thus a new site collection? By default, the new site collection will only show the standard templates. To understand this, you need to know that SharePoint has a global site template gallery. Any site template in that gallery will be available for every site you will create, regardless of whether it is a top site in a new site collection, or a subsite.

To add site templates to that global site template gallery, you will need another tool, because WSS does not allow you to do it with the ordinary web-based administrator tool. Once again, you must call upon STSADM.EXE, which you used before. If you followed the instructions in Chapter 2 on how to add the path to this tool to the system environment path, you will find this very easy to do.

Try It Out Add Site Templates Using STSADM

image from book
  1. Log on to the WSS server as a SharePoint administrator.

  2. Start up a command prompt (Start image from book Run, then enter Cmd and press Enter).

  3. Use steps 1 to 6 of "Try It Out: Copy a Site Template to Another Site Collection" above to save the site template and add it as a file to the file system. For this example, assume that the file is named c:\tmp\green.stp.

  4. Type the following command, and press Enter:

         STSADM --o AddTemplate --Filename C:\tmp\Green.stp --Title "The Green Template"↩     --Description "This is a site template copied using Stsadm." 

    Important 

    If you get a list of all available options now, you have misspelled something. Check your spelling, and repeat the steps.

  5. You must now reset the IIS. While still at the command prompt, type IISReset and press Enter.

  6. When the command is finished, test your work by creating a new top site: Open SharePoint's Central Administration tool, click on the Application Management tab, and then click on Create site collection. You should see the new custom site template in the Custom tab (see Figure 6-4, where the new template is named The Green Template).

image from book

image from book
Figure 6-4

Listing a Custom Site Template in the Global Gallery

While you still have the command prompt window open, you can try some more things. For example, if you want to see what global site templates are installed, type this command:

     STSADM --O EnumTemplates 

It will show all that you have added manually. But what about those default site templates, such as the Team Site and the Blank Site? They are listed along with your own templates when creating the new site, but they are not listed here. Well, they are a bit special. You will not see them listed here because they are part of the actual site definition. When you created your custom templates, you told WSS to save the modifications of the basic site definition - nothing more. In other words, the template file you copied to the file system is not a complete site definition! For example, if you try importing this file into another WSS installation that for some reason does not have the same site definition, it will fail!

Removing a Custom Site Template from the Global Gallery

You can also remove custom site templates from the global site template gallery. To do this, you will once again use the STSADM tool, as described in the following Try It Out.

Try It Out Remove a Site Template Using STSADM

image from book
  1. Log on to the WSS server as a SharePoint administrator.

  2. Start up a command prompt (Start image from book Run, then enter Cmd and press Enter).

  3. Type the following command and press Enter to delete a site template with the title The Green Template:

         STSADM --o deletetemplate --Title "The Green Template" 
  4. You must now reset the IIS. While still at the command prompt, type IISReset and press Enter.

image from book

If this was the last custom site template added to the global site template gallery, this process will also remove the Custom tan from the Select a template section (see Figure 6-4).



Beginning SharePoint 2007 Administration. Windows SharePoint Services 3 and Microsoft Office SharePoint Server 2007
Software Testing Fundamentals: Methods and Metrics
ISBN: 047143020X
EAN: 2147483647
Year: 2004
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net