Previous Page TOC Next Page



6


Working with Pages and Files


by William Robert Stanek

The most basic contents of your FrontPage webs are the individual files that make up the web. These files can be pages, images, and even multimedia objects. Working with pages and files is easy if you take the time to learn how FrontPage works. Although this chapter focuses primarily on working with pages, you can use the concepts covered in this chapter to manipulate other types of files as well. Because this chapter covers basic concepts, advanced users might want to skim the chapter for key points.

Editing Pages


Before you can edit a page, you must first create it. The easiest way to create a page is to select New from the File menu in the FrontPage Editor, which opens the New Page dialog box shown in Figure 6.1. Now you can choose a template or wizard to base your page on by double-clicking when the pointer is over the template or wizard title. Alternatively, you can use the arrow keys on your keyboard to highlight a template or wizard and then press the Enter key to make a selection.

Figure 6.1. Selecting a template or wizard for your new page.

For now, you probably want to base your pages on the normal page template. All this template does is create a blank page for you. To learn all about the other templates available in FrontPage, see Chapter 21, "Creating Web Pages with Templates."

To edit pages, you use the FrontPage Editor. You enter text just as you do in any word processor. Because the editor is a WYSIWYG tool for creating HTML documents, behind the scenes it is generating HTML markup for your document as you enter text, formatting, and images. You can add dozens of HTML elements to your pages with the FrontPage Editor. You will learn how to add these elements to pages in Part III, "Working with FrontPage."

Opening Existing Pages


When you select Open from the File menu to open an existing page, you see a dialog box that lets you open files based on their location. You can open files from the current web, files on your hard drive, or files on the WWW.

Opening Pages from the Current Web


As you see in Figure 6.2, the Open File dialog box has two tabs. Using the Current FrontPage Web tab, you can open pages from the current web without knowing where the files are stored on your hard drive. You use this option when you want to open files that are part of the current web.

Figure 6.2. Accessing current FrontPage webs with files listed by name and title.

Figure 6.2 shows the default view for files in the current web, which lists files by name and title. You can change the view for files using the two buttons in the upper-right side of the dialog box. As Figure 6.3 shows, the Folder View lists files by name without titles.

Figure 6.3. Accessing current FrontPage webs with files listed only by name.

The Look In field of the Current FrontPage Web tab is somewhat deceptive. You cannot use it to search your file system. Instead, this field lists folders within the current web that you've visited, and using this field, you can quickly re-visit a folder within the current web.

To the right of the Look In field is a button that allows you to go up one level in the folder hierarchy. You can only use this button when you previously moved down the folder hierarchy by double-clicking folders within the current web.

Opening Files from Your Hard Drive


Using the Other Location tab of the Open File dialog box, you can open a file that exists anywhere on your hard drive (see Figure 6.4). You should use this option only to open pages that are not available in a web you created with FrontPage. By default, the From File option is selected. If you know the full directory path to the file you want to open, you can enter it directly. Otherwise, click the Browse button.

Figure 6.4. Using the From File option to open local files that are not part of the current web.

The FrontPage Editor supports multiple file and document formats. When you open files in a format other than HTML, the FrontPage Editor converts the page to HTML format. Formats supported by the editor include the following:

Most document formats are automatically converted to HTML. The converted page is usually formatted exactly as it should be. However, pages in ASCII text format are not automatically converted. Before the editor converts the page, you must specify how you want the page to be formatted using the dialog box shown in Figure 6.5.

Figure 6.5. Selecting a style for ASCII text pages.

Usually, you want to use the default option, which imports the page with most paragraph returns intact. Following is a summary of each of the options:

One formatted paragraph Your page is imported as formatted text, and paragraph returns are not always preserved.
Formatted paragraphs Your page is imported as formatted text with paragraph returns preserved.
Normal paragraphs Your page is imported as text using the normal text style, and paragraph returns are not always preserved.
Normal paragraphs with line breaks Your page is imported as text using the normal text style, and paragraph returns are preserved.

NOTE

The difference between normal text and formatted text is the font the browser uses. Normal text is displayed with the standard proportional font used by the browser, such as Times Roman. Formatted text is displayed with a non-proportional font like the one most typewriters use, such as Courier.



Opening Pages from the Internet


The Other Location tab of the Open File dialog box also lets you open pages located on external Web servers (see Figure 6.6). In the From Location field, enter the fully qualified URL to the external resource, such as the following:




http://www.mcp.com/index.html

Figure 6.6. Using the From Location field to open resources from external sources.

Saving Pages


After editing a page, you want to save it. Generally, all pages are saved to the current web. This means that before you create a page, you should create a web in the FrontPage Explorer. (See Chapter 7, "Working with Webs," to learn more about creating webs.)

To save a page, select either Save or Save As from the File menu. All pages are saved to the location you opened them from, which is usually the current web. For new pages, the Save As dialog box opens when you select Save; a new page must specify a title and filename for your page, which is done with the Save As dialog box. Figure 6.7 shows the Save As dialog box.

Figure 6.7. The Save As dialog box.

All pages you create in the Editor are given a default title and file name. Usually, you want to enter a new title and filename. Enter the title in the Page Title field. The title should describe the contents of the page. Enter the filename in the Page URL field. The filename should end with an .htm or .html extension, which identifies the page as an HTML document. When you are finished, click the OK button to save the page to the current web.

If you do not have a web open in the FrontPage Explorer when you try to save a page and you have already started the FrontPage Explorer, you see the error message shown in Figure 6.8. This error message tells you to open a web in the FrontPage Explorer so you can save the page. When you click the OK button, the Explorer displays the Open Web dialog box so you can select a web to open.

Figure 6.8. When no web is open and you try to save a page, you see this error message.


NOTE

If you have not created a web, the only web available is the root web. Generally, you should not save pages to the root web. Instead, create a test web as discussed in Chapter 7, "Working with Webs."


If you have not started the FrontPage Explorer and you try to save a page, the OK button is grayed out so you cannot click it. When this happens, you can click the Cancel button to cancel the save. You should then start the FrontPage Explorer, open a web, and then save the page.

The Save As dialog box enables you to save pages as files and as templates. To save the page as a file, click the As File button. When you save the page as a file, the page is saved on your hard drive, which means that the file is not saved to the current web. To save the page as a template, click the As Template button. This creates a new page template based on the contents of your page. You can now create pages based on this template using the New Page dialog box.


NOTE

If a page you save as a file on your hard drive contains images or other objects, the Editor displays a dialog box asking if you want to save the images and objects with the page. Saving these objects with the page ensures that you have everything you need to publish the page in one place.


Another error message you might see when saving pages is shown in Figure 6.9. You see this message when you save a page from a web that is not the current web. If you click the Yes button, the page is saved to the current web. Because this is usually not where you want to save the page, click the No button and then do the following:

  1. In the FrontPage Explorer, make the web that the page came from the current web.
  2. In the FrontPage Editor, save the page.

Figure 6.9. When saving a page from a web that is not the current web, you see this error message.

Renaming and Moving Pages


You can only rename files in the FrontPage Explorer's Folder View. Once you are in Folder View, you can rename files by selecting Rename from the Edit menu or by right-clicking and selecting Rename from the pop-up menu. After you select the Rename option, you can edit the file name (see Figure 6.10). When you are finished, click a different file for the change to take effect.

Figure 6.10. You can only rename files in the FrontPage Explorer's Folder View.

Switching to the FrontPage Explorer to rename a file might not seem logical. After all, you could use the Save As option on the FrontPage Editor's File menu to create a new file. However, the old file the page is based on still exists at its original location. To make sure that there is only one copy of the file in a web, you need to switch to the FrontPage Explorer.

Another reason to rename files using the FrontPage Explorer is that all links within the current web that lead to the file are automatically updated. This saves you the trouble of updating links throughout the web.


TIP

You can rename any type of file, including images, HTML pages, applets, and even ActiveX controls. Afterward, FrontPage automatically updates hypertext links that lead to the resource you changed.


Moving files around the current web is also accomplished in the Folder View of the FrontPage Explorer. To move a file, left-click its entry in the Folder View, hold the mouse button, and drag the file to its new location.

The FrontPage Explorer only allows you to move files to existing folders within the current web. If you want to move a file to a new folder within the current web, you should create the folder before trying to move the file. To create a new folder, select New from the File menu and then select New Folder. Be sure to give your folder a name that helps you identify its contents.

Files you move around a web often affect other pages in the web, especially if there are links pointing to the file you are moving. Fortunately, the Explorer automatically tracks all links to files in your webs, and if moving the file invalidates links in other files, the Explorer gives you the option of automatically updating links to the file. The dialog box you see when this happens is shown in Figure 6.11. By clicking the Yes button in the Confirm Updating Links dialog box, you can confirm that you want to update links throughout the web.

Figure 6.11. FrontPage can automatically update links in your web when you move files.

Hiding Files from Browsers


In FrontPage, all directories beginning with the underscore character are hidden from users. Often when you create a web, you have files that users should not access or view directly. For example, if the headers and footers for pages in your web are in separate HTML documents, you usually do not want users to access the header or footer documents directly. In this case, you move the files to a directory users cannot access, such as _private.

Deleting Files from the Current Web


Deleting files from the current web is easy but not necessarily intuitive, especially because you can only delete files in the FrontPage Explorer. To delete a file, select the file in any of the views and then use the Delete option on the Edit menu. Whenever you attempt to delete files, the FrontPage Explorer asks you to confirm that you want to delete the files. If you do, click the Yes button in the confirmation dialog box.


TIP

Using the Folder view, you can select multiple files for deletion. After selecting the first file by clicking it, hold down the Ctrl key to select additional files. You can select a group of consecutively listed files by clicking on the first file you want to select and then moving the mouse pointer to the last item and holding the Shift key as you click the left mouse button.



Associating Files with Editors


Most files end with a three- or four-letter extension that identifies the file type or the formatting of the file, such as HTML documents that end with the .htm or .html extension. The FrontPage Explorer uses the file extension to determine which editor to use with the file you want to open for editing.

Using the FrontPage Explorer, you can configure additional editors for use with FrontPage by selecting Options from the Tools menu. This opens the dialog box shown in Figure 6.12. As shown, select the Configure Editors to see a list of all currently configured editors and the associated file extensions.

Figure 6.12. The Configure Editor dialog box shows the editors configured for use with FrontPage.

When you install FrontPage, five editors are configured for your use. The FrontPage Editor is configured as the editor for files ending with the .htm, .html, .htx, or .asp extensions, which are treated as HTML pages. To handle frame-enhanced documents, the Frames Wizard is configured as the editor for documents ending with the .frm extension, which is the extension FrontPage uses to identify the source file for frame-enhanced pages. The Database Connectivity Wizard is configured as the editor for documents ending with the .idc extension, which is the extension FrontPage uses to identify the source file for database pages. The Image Composer is configured to handle most image types including GIF, JPEG, TGA, BMP, TIF, DIB, ACC, and MIC. Although the Windows Notepad is configured as the editor of choice for other file types, it is used only if FrontPage cannot resolve which editor to use for a file.


TIP

If you have default editors set on your desktop, you might not have to configure editors at all. In Windows 95 and Windows NT, editors are configured for most file types automatically when you install software and can be manually configured using the Windows Explorer. When the FrontPage Explorer tries to determine the editor to open, it looks first at the editors you configured locally and then at the editors configured for the Windows desktop.


To add an editor to the list, click the Add button in the Configure Editors dialog box. As you can see from Figure 6.13, the Explorer displays a dialog box in which you can configure the editor. In the File Type field of the Add Editor Association dialog box, enter the three- or four-letter extension that identifies the type of file you will use the editor with. In Figure 6.13, you can see that the user is configuring an editor for use with PCX images, so the file type is PCX.

Figure 6.13. To add editors, you must specify the file type.

In the Editor Name field, enter a name for the editor. The name does not have to be the actual name of the program; rather, it is the name with which you want to identify the editor. In the Command field, enter the full path to the editor's binary executable file. If you do not know the path, click the Browse button and the Explorer displays a dialog box that enables you to browse your file system.


NOTE

Although most editors can be used with multiple file types, the Explorer allows you to configure only one file type at a time. You should go through the configuration process one time for each file type you plan to use with the editor.


For editors that you configure, you can make changes to editor definitions or remove them from the editor list. After selecting an editor you want to change, click the Modify button in the Configure Editors dialog box. This opens a dialog box labeled Modify Editor Association, which has the same fields as the dialog box shown in Figure 6.13. To remove an editor from the list, select it and then click on the Remove button.

Summary


Creating, editing, and deleting files is easy if you take the time to learn how FrontPage works. After reading this chapter, you should be able to work with just about any type of file in FrontPage. You are now ready to learn about working with webs.

Previous Page Page Top TOC Next Page