Tải bản đầy đủ (.pdf) (7 trang)

Thủ thuật Sharepoint 2010 part 07 pot

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (417.35 KB, 7 trang )

Working with SharePoint Pages

39
in the following section, but for now you should be aware that any library and list created can also
be used on just about any page in a site. Users may find it useful to have a Web Part that lists newly
uploaded documents or recent announcements directly on the company’s intranet home page.
List view Web Parts are also particularly useful in that they are directly tied to the list from which
they are created. This also gives users the flexibility to update information on a web page without
having to actually edit the content of the page itself — the List view Web Part is all maintained in
the list itself. Another benefit of being able to use a List view Web Part is that it offers all the flex-
ibility of being able to display any views created for the list, as well as have its own views created
specifically for it. For example, you could create a list of events whose default view is a Calendar
view when the list is open, and at the same time you can have the same list displayed on a web page,
but in a Standard view format.
Yet another use for these List view Web Parts is the capability to display more than one instance
of the same list on a page, with each instance displaying a different view. Or, you can even display
many lists on a page, making it easy to compare information between lists. Perhaps you have a
document library with specific views created that display only certain documents at a time. You can
have two Web Parts of the document library on a web page, and set each Web Part to a unique view,
so each shows different documents. When any documents that meet the criteria in the views are
added to or removed from the library, the Web Parts on the web page will automatically reflect the
changes.
WORKING WITH SHAREPOINT PAGES
Now that you know quite a bit about how lists and libraries work in SharePoint, this section
describes how the new SharePoint 2010 interface has changed and improved the page-editing
experience.
When browsing a SharePoint page, you are actually seeing the compilation of many different com-
ponents all quickly rendered by the server and served to the browser. The two main components of
a SharePoint page are the master page and the page layout. In very basic terms, the master page is
the container for the overall site layout. It holds the basic structure of the site, such as the location of
the navigation, search, and the Ribbon. It also houses the page layout, which is generally the main


body of the page and contains the page’s content. Refer to Chapter 23 for more detailed information
on master pages and page layouts. When you are editing a SharePoint page in the browser, you are
actually working with the page layout to add content to the site.
The page-editing experience in SharePoint 2010 is a little different from that found in previous ver-
sions. Again, the Ribbon plays a major part in editing a page — in fact, it’s probably used even more
extensively when editing a page than when working with lists and libraries.
Fortunately, the Ribbon has been very tightly integrated with the page-editing experience, to the
point that many users will likely find that adding content to a SharePoint page is not much different
from working in Microsoft Word. Just like the Office clients, the Ribbon is also contextual when
working with various items. Different options appear in the Ribbon when working with a picture
than when working with a List view Web Part, for instance. Before you can even begin working
extensively with the Ribbon, however, you need to first begin to edit the page.
40

CHAPTER 2 the NeW aNd imProved User exPerieNce
When browsing a page normally, the Ribbon is very discreet.
Only the Browse and Page tabs are visible; the Ribbon menu
itself is collapsed. By default, the Browse tab is selected. Next to
these tabs is the Edit Page icon, which looks like a pencil on a
piece of paper (see Figure 2-18). Clicking this icon is only one of
several ways to begin the editing process. You can also edit the
page by clicking the Site Actions button and then selecting Edit page, or click the Page tab in the
Ribbon and click Edit Page. Note that only users with permission to edit pages will be presented
with these options.
Exploring Edit Mode
Using the Ribbon to edit pages in SharePoint is actually a lot like using it in lists and libraries. Each
tab is divided up into groups, and each group consists of several different options represented by icons
(with the exception of the Browse tab, which doesn’t have a menu, but instead simply lets you browse
the current page). As you work with various components of a page, additional tab options appear in the
Ribbon, and other buttons become active when certain actions are performed on the page.

When a page is opened in Edit mode, you’ll notice a few changes. First, you’ll notice that the Ribbon
has grown a bit. Under the Editing Tools heading, two new tabs now appear in the Ribbon — Format
Text and Insert — under the heading “Editing Tools. The Format Text tab provides you with a
menu very similar to Word’s Home tab, with options for formatting the text on the page. You can
change the font, the font size and style, its justification, create numbered and bulleted lists, and
even change the font color. There is even a Spell Check button, and advanced users can edit the
HTML markup directly to achieve exactly the formatting they want. Editing a SharePoint page also
provides the capability to copy, cut, and paste content to and from the page, and even features Undo
functionality. This tab drives home the point that editing a SharePoint page is more like working
in a Word document than creating a web page. You also have options such as Save and Check Out,
which are covered in more detail later. Figure 2-19 shows the additional options that become avail-
able in the Ribbon when the page is in Edit mode.
FIGURE 219
The Insert tab allows you to do what you would expect it to — that is, insert content on the page.
You can insert a table, a picture, or multimedia in the form of video and audio; create links to other
FIGURE 218
Working with SharePoint Pages

41
websites; upload and create a link to a file on the fly; and insert any reusable content stored in the
Reusable Content list, various Web Parts, an existing list, and a new list created on the fly (see
Figure 2-20). The Insert tab provides a host of options to add content, making it extremely easy to spruce
up a web page without much effort. You’ll be taking a more detailed look at these options in a bit.
FIGURE 220
When a page is in Edit mode, you will notice that switching back to the Page tab allows a few addi-
tional options to become available.
As you edit pages in SharePoint, you can save your changes to the server so others can see them.
During the editing process, you can click the Save button in the Ribbon (either on the Format Text
tab or the Page tab) to simply save your changes and stop editing. You also can click the drop-down
arrow underneath the Save button for additional options, such as the capability to save content and

continue editing, or to stop editing altogether. With the latter option, you are prompted to save your
changes or discard your changes.
One final point to note about Edit mode is that the page is divided into blocks, called zones. In
these zones you can place content such as text or Web Parts. How content is placed depends on the
type of page you are working with, but generally just about any type of content can be added to a
SharePoint page.
Adding Content to Pages
SharePoint 2010 utilizes several different page options, which are available on different site types. A
team site, for example, features what are called Text Layouts. You have several different text layouts
from which to choose, and their function is to reorganize the zones on the page to allow for more
design options when formatting content. Using these text zones, you can add Web Parts and text
directly. Other zones will allow only Web Parts to be inserted.
Other types of SharePoint sites utilize Page Layouts instead of Text Layouts. Sites that utilize the
Publishing infrastructure of SharePoint, or that have the Publishing Feature enabled, will use Page
Layouts. Page Layouts provide some flexibility over Text Layouts in that they can be edited in
SharePoint Designer, and users with appropriate permissions can create and upload custom Page
Layouts to meet their needs.
42

CHAPTER 2 the NeW aNd imProved User exPerieNce
Direct Page Edits
Many Text Layouts and Page Layouts allow for direct page editing. As the name implies, direct page
editing is the capability to edit directly on a page. This function was available in SharePoint 2007
with page content controls, but in SharePoint 2010, editing text and content on a page is now even
easier. Indeed, adding and editing text on a SharePoint page is as easy as clicking on the page and
starting to type. We keep emphasizing that editing SharePoint pages is similar to working with a
Word document, and with the improved direct page editing, it truly is.
When working with text on a page, the Ribbon switches to the Format Text tab. As you work
with the text on the page, you can use SharePoint’s Live Preview mode to preview most formatting
changes before committing to them. To use Live Preview, highlight the text you’d like to change and

hover the mouse cursor over, for example, a new font size in the size drop-down in the Ribbon, as
shown in Figure 2-21. The highlighted text will temporarily change to the new size, letting you see
if you like the change. You can also use Live Preview to experiment with different fonts, as well as
styles and markup styles.
FIGURE 221
The Ribbon features more than just items for working with text on a page. Additional tasks that can
be performed with a Ribbon include cutting, copying, and pasting text to and from a SharePoint
page just as you would any other application. Undo and Redo buttons also help with the editing
experience, as well as the capability to edit the HTML that makes up the page. In the Markup
group in the Ribbon, you can choose to edit the HTML Source, or convert any existing HTML on
the page into XHTML, which helps increase the page’s browser compatibility. SharePoint 2010 fea-
tures a robust spell check as well.
Dealing with Save Conflicts
When more than one person is working on a web page at the same time, they may run into a save
conflict. A save conflict occurs when user A and user B are making changes to the same web page,
Working with SharePoint Pages

43
and user A saves the page while user B continues working. With SharePoint 2010, when you try to
save the page, a window opens with several options:
Continue Editing — You can continue editing, but you will need to manually merge any

changes you make later.
Merge Changes — A second window opens with the most current version of the page so you

can merge changes or additional text from your version of the page with the saved version.
Discard Your Changes — This option deletes any changes you’ve made to the page in favor

of the version that’s been saved before yours.
Overwrite the Page — This option discards the version saved by another user and replaces it


with your version.
In most cases, you will probably want to choose Merge Changes, to at least look at the changes
made by the other user. You can always close the newly opened window and save the changes again,
choosing Overwrite the Page to discard the other user’s changes.
Checking Pages In and Out
The problem of save confl icts can be mitigated by using the check-out tools built into SharePoint.
In the Ribbon, you can click the Check Out button to check the page out to yourself. Checking out
a page is essentially the same idea as checking out a document from a library. Basically, the page is
exclusively yours to edit and change while you have it checked out.
One note of caution here: If you have started editing a page before you check it
out, your changes will be deleted, so check out a page before you begin editing
it. If you have changed a page and need to check it out, save your changes fi rst
and then check the page out.
You can check in and out from the Ribbon, just as you can check out documents or items in a library or
list. Click the Check Out button to check the current page out to yourself, preventing other users from
being able to edit the page as you work on it. The Check Out button becomes the Check In button, and
also provides you with a few additional options in the drop-down menu below the button. If you acci-
dentally checked the page out, you can always discard the check out (which also discards any changes
made to the page) by clicking the Check In drop-down menu and selecting Discard Check Out.
When a user with edit rights browses to a page that is currently checked out, a message is displayed at
the top of the page indicating that the page is currently checked out, and to which user it is checked
out. In addition, note that saving a page does not check the page in. If a page is checked out, then it
remains checked out until it is checked in. You can, however, check a page in to save the page.
Overriding Check Outs
Administrators and users with the Override Check Out permission can override another user’s
checked out page. The Override Check Out permission is built into the Design permission level. If
44

CHAPTER 2 the NeW aNd imProved User exPerieNce

you browse to a page that is checked out to another user, the Check Out/In button is replaced with
an Override Check Out button. If you have sufficient rights, then you can click the button to change
the check out to yourself, which will discard the other user’s changes and allow you to begin editing.
Be aware, though, that there is no prompt to warn you that you will be discarding another user’s
changes when overriding a check out from the Ribbon.
Users with override permission can also check in the page from the Pages library for another user.
This is done by clicking the drop-down menu for a page in the Pages library and selecting the Check
In option, or clicking the Check In button in the Ribbon. Checking in a page for another user is less
destructive than overriding the check out, as it will save the changes to the page, and then check it
in. Checking in a document for another user can only be done from the Pages library and not from
the page itself. This method also lets you know that you are checking in a document for another
user, and tells you how long the page has been checked out.
Publishing
When using a site with Publishing features enabled, you will have an additional tab in the Ribbon
for publishing content. You will still be able to save a page’s content as you are working on it; but
publishing, in SharePoint terms, means that the final version of the page is hidden from anyone
without proper rights until the Publish button is clicked. Publishing a SharePoint page is the same
concept as publishing a book. The book is available only to the author and editors during the cre-
ation process; until it is published, the public doesn’t have access to it. The same concept applies to
SharePoint — the page author and other individuals with proper rights are the only ones who can
see the page as it’s being worked on, but other general users of the site can’t see the contents of the
page until it has been published.
When the Publish button is clicked, SharePoint will
check the page for any draft items and spelling errors
before committing the changes, as well as give you a
text field to type comments about what has changed
in this published version of the page. You can exit
out of the checking pop-up to check the spelling from
the Format Text tab, or click the link in the status
bar that opened to see a report of all spelling errors

and draft items on the page that will be published
(see Figure 2-22).
If you are working on a previously published page, users will see the last published version of the
page before you began editing it. SharePoint serves up the last published version of the page until
a new version is published to take its place. Because SharePoint 2010 still supports versioning, it is
possible to roll back to a previously published version of a page, as long as versioning is turned on
for the library containing the SharePoint pages.
If a user with rights to edit a page browses to a page that’s being edited, a message is displayed indi-
cating that the page is published and that it’s also checked out and being edited by another user. The
user editing the page also has a notice under the Ribbon saying that the page is currently checked
out and editable.
FIGURE 222
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.

×