|
|
Changing the Way Lists and Libraries are Displayed
Lists and libraries are cornerstones of Windows SharePoint Services functionality. They allow you to store information
and documents in a central location, and allow content owners to upload and
update the information and documents themselves. List and library views can
also be sorted or
filtered, and even displayed on multiple pages on your
site. This article discusses some of the most common ways to use FrontPage 2003
to customize the way Windows SharePoint Services lists and libraries are
displayed on Web pages.
Topics covered in this article include:
The number of ways you can change the display of Windows SharePoint Services
list or library views is immense. Here are just a few examples of ways you can
customize the display of Windows SharePoint Services lists and libraries with
FrontPage 2003. Click the thumbnail image to see a larger view of it.
One of the biggest advantages to centralizing data in lists and libraries is
that you can freely re-use that data in other places on your Web site. Once a
view of a list or library is inserted into your Web page, you can also change
the way that data is displayed in a wide variety of ways. The remainder of this
article describes how to change the way that a staff list is displayed on a
page. You can use these principles to change the views of libraries and other Windows
SharePoint Services elements as well.
Tip: If you would like to follow these steps using the same list we
used, you can download our Staff List spreadsheet
and then convert the spreadsheet into a list.
Here are the steps to take to insert a view of a Windows SharePoint Services
list or library into a Web page on the site that contains that list.
- Open FrontPage 2003 and the page you want to insert the list or library
into.
- Click the location on the page you want the list to appear.
- Click the Web Part option on the Data menu. The Web Parts task
pane opens.

- Click the name of the Web Part you want to insert on the Web Part
List, and then click the Insert Selected Web Part button. The Web Part is inserted into your page.
- Save your Web page by clicking the Save option on the File menu.
Now you can view the list in the browser.
It is
easy to change the fields displayed in a list or library once you have inserted
a view of it into a Web page. Here are the steps to follow:
-
Open
FrontPage 2003 and then open the page that
contains the list you want to change the view of.
-
Right-click on the list, and then click
List View Properties. The Data View Details task pane opens.

-
Click
the Fields link and then the Displayed Fields dialog box opens.

-
To add fields to the list, click on them in the
Available fields box, and
then click the Add>> button. To remove
fields from display, click on them in the Displayed fields box, and then
click << Remove. You will notice that some fields cannot be removed from
some views. These fields are marked with the *.
Tip:
You can use CTRL + click to select multiple items, and then click
Add>>.
-
You can
also change the order of the fields displayed by clicking the field in the
Displayed fields box and then clicking the Move Up or Move Down
buttons. When the fields are as desired, click the OK button.
-
Save your
Web page by clicking the Save option on the File menu. The fields
displayed are changed.
Tip:
Try changing to a different list style if there are fields you want to remove
from the view on your page that are not removable. See the
Changing List Styles section in this document for more information.
There are
ready-made templates for lists that you can take advantage of to save time and
give all of your list views a professional look. Here is how to change list or
library view styles:
-
Open
FrontPage 2003 and then open the page that
contains the list you want to change the view of.
-
Right-click on the list,
and then click List View Properties. The Data View Details task
pane opens.

-
Click the
Style link, and then the View Styles dialog
box opens.

-
Click the style you would like to use in the
HTML view styles
scroll box, and then click OK.
-
Save your Web page by clicking the
Save option on the File menu. The style for the list is changed.
There may be cases where you do not want to display an entire list due to
space constraints on your Web page. You can easily limit the number of records
display in a list or library when you follow these steps:
- Open
FrontPage 2003 and then open the page that
contains the list you want to limit the number of records displayed in.
- Right-click on the list,
and then click List View Properties. The Data View Details task
pane opens.

- Click the Style link. The View Styles dialog box
opens.
- Click the Options tab.
- In the Record Sets section of the View Styles dialog box,
make sure that the Limit the total number of items displayed to
radio button is selected, and then type the number of records you would like
to display.

- Click OK.
- Save your Web page by clicking the Save option on the File menu. The list is changed.
The lists
displayed on the home page of a default Web site created with Windows SharePoint
Services include a title bar that contains the name of the
list, such as Announcements, Events, and Lists. If you want to remove this title
bar, you can follow these steps:
-
Open
FrontPage 2003 and then open the page that
contains the list you want to remove the title bar from.
-
Double-click on the list,
and then the <List Name> window opens.
-
Click
the None option from the Frame
Style drop-down box.

-
Click
OK. The title bar is no longer on the list or library view.
-
Save your Web page by clicking the
Save option on the File menu.
The lists
that are displayed on the home page by default in sites created with Windows
SharePoint Services have the option to add new
items. However, you can change the toolbar options to suit your needs.
Here are your options:
| Toolbar Option |
Example |
| No
Toolbar |
 |
| Summary
Toolbar |
 |
| Full
Toolbar |
 |
Here are
the steps to follow to change the type of toolbar used on the view of a list or
library.
-
Open
FrontPage 2003 and then open the page that
contains the list on which you want to change the toolbar type displayed.
- Right-click on the list, and then click List View Properties The Data View
Details task pane opens.

- Click the Style link, and then the View
Styles dialog box opens.
- Click the Options tab, and then follow the
steps for the type of toolbar you would like to use:

| Option |
Steps |
| No toolbar |
Make sure
that the Show toolbar with options for checkbox is unchecked. |
| Summary toolbar |
Select
Summary toolbar from the
Show toolbar with options for drop-down
box. |
| Full toolbar |
Select
Full toolbar from the Show toolbar with options for drop-down
box. |
-
Click
OK. The toolbar has been changed.
- Save your Web page by clicking the Save option on the
File
menu.
You can insert a view of a list or library into a page, and then limit the
data displayed by using filtering. Filtering allows you to display only the
records that meet the criteria you choose. Here is how to filter a list that you
have inserted into a page.
- Open
FrontPage 2003 and then open the page that
contains the list display you want to filter.
- Right-click on the list, and then click List View Properties. The
Data
View Details task pane opens.

- Click the Filter link and then the
Filter Criteria dialog box opens.
- Click the Click here to add a new clause link.
- Select the field you would like to filter on by clicking the Field Name drop-down box, then click the Comparison drop-down box and then select the comparison option you want to
use (such as Equals, Greater Than, and Less Than).
- Click the Value drop-down box and then type the value you want to compare
against, such as “Region Equals Asia Pacific.”

- Click the Click here to add a new clause link to add more criteria to filter against.
- When you are finished, click the OK button.
- Save your Web page by clicking the Save option on the File menu. The list is now
displayed with only the data that meets the criteria you set.
Changing the sort order of list or library views is easy; simply follow these steps:
- Open
FrontPage 2003 and then open the page that
contains the list of which you want to change the sort order.
- Right-click the list, and then click
List View Properties. The Data View Details task pane opens.

- Click the Sort & group link. The Sort and Group dialog box opens.

-
If
the fields you want to sort against are already in the Sort order box,
you can click them and then click the Move Up or Move Down button
to change their sort priority.
- If there are fields in the Sort order box that
you do not want to sort against, click the fields and then click the <<Remove
button.
- If there are fields in the Available Fields box that you want to
sort against, click them and then click the Add>> button.
- Make sure that
the Ascending radio button is selected for each field you want to sort
against if you want the sort to go from lowest to highest, or that the Descending radio button is selected if you want the sort to go from highest
to lowest.
- Click OK when you are finished.
- Save your Web page by
clicking the Save option on the File menu. The list is now
displayed with the sort order you specified.

New in
FrontPage 2003, you can create grouped list or library views to make it easier
for users to find the information they are looking for. For example, in the list
view shown, the staff list is grouped by region to make finding people in each
region easier. You can follow these steps to display list data grouped
by a field:
-
Open
FrontPage 2003 and then open the page that contains the list you want
to group.
-
Right-click on the list, and then click
List View Properties. The Data
View Details task pane opens.

-
Click
the Sort & group link. The Sort and Group dialog box opens.

- Click
fields you want to sort on first, and then click the Add>> button to add
them to the Sort order box.
- Make sure that the Ascending radio
button is selected for each field you want to sort against if you want the sort
to go from lowest to highest, or that the Descending radio button is
selected if you want the sort to go from highest to lowest.
- Make sure
that the field you want to group by is in the Sort order box. In the
example above, we grouped against the Region field so made sure that it was
first in the list.
- Make sure that the Show group header check box is
checked and that the Expand group by default radio button is selected.
- Click OK.
- Save your Web page by
clicking the Save option on the File menu. The list is now
displayed grouped and sorted as desired.
Grouping
and then collapsing list content is a great way to make a long list of data easier to navigate. For
example, this Staff List is grouped to show only the Regions by default, and
when the visitor clicks the , the
list of staff by region expands. Similarly, if the visitor clicks the , the
list of staff by region contracts. Here are the stops to take to create a view
of a list that is sorted, grouped, and collapsed.
-
Open
FrontPage 2003 and then open the page that contains the list you want
to group and collapse.
-
Right-click on the list, and then click
List View Properties. The Data
View Details task pane opens.

- Click the Sort & group link and then the Sort and
Group dialog box opens.

- Click
fields you want to sort on first, and then click the Add>> button to add
them to the Sort order box.
- Make sure that the Ascending radio
button is selected for each field you want to sort against if you want the sort
to go from lowest to highest, or that the Descending radio button is
selected if you want the sort to go from highest to lowest.
- Make sure
that the field you want to group by is in the Sort order box. In the
example above, we grouped against the Region field so made sure that it was
first in the list.
- Make sure that the Show group header check box is
checked and that the Collapse group by default radio button is selected.
- Click OK.
- Save your Web page by
clicking the Save option on the File menu. The list is grouped, sorted
and collapsed as desired.
XSLT
Data Views represent powerful new ways to format list and library view data
in FrontPage 2003. XSLT Data Views allow you to display and then format
Windows SharePoint Services list or library data however you choose. This
example shows form data interspersed with plain text to form complete
sentences from the data. For example, the sentence in the XSLT Data View of
the staff list that reads, "Helge Hoeing is part of the Americas region and
is a Sales Representative reporting to Britta Simon" is actually created by
displaying [Full Name]+" is part of the "+[Region]+" region and is a
"+[JobTitle]+" reporting to "+[Reports To]+"."
Here are the steps to take to convert a list or library view and convert it
to an XSLT Data View, and then format the data:
- Open
FrontPage 2003 and then open the page that contains the list you want to work
with.
- Right-click the list, and then click Convert to XSLT Data View. The
Data View Details task pane opens.

- Click inside the list Web Part where you want to edit the list, and then type freely. You can add
or remove columns in the table displaying the data, you can change fonts and
formatting, and more. For example, for our free-form staff list we simply clicked after
the name of a staff member, and then typed "is part of the."

You will notice that this text is automatically added to all of the records in
your list view.
- Click inside the list Web Part where you want to add a field from your list, and then right-click
the field you want to add on the Data View Details task pane. Choose one of
the formatting options by clicking on it.

Tip: To create our free-form staff list, we chose Insert as Text for
all of the fields except for the EmailAddress field
— for that field,
we chose Insert as Hyperlink.
- Repeat steps 3 and 4 until the XSLT Data View is the way you want it.
- Save your Web page by
clicking the Save option on the File menu. The XLST Data
View is now
displayed.
| |
|
|
|
|
|
► |
|
Q: |
|
How can I constrain the width of a list? |
| |
|
A: |
|
By default, if you place the Web Part inside a table or
table cell that has a fixed height or width, the Web Part will stay
inside those limits. |
Here are links to articles regarding lists:
|