CONTENTS

 


 

What Is Web View?

Windows 98 incorporates a single Explorer window that lets you shift effortlessly between local files and pages on the web. So why not take the next step and view your files and folders as web pages?

Ordinarily, Explorer displays files, folders, and other system objects as icons in a window. You can choose between large and small icons, and you can arrange them in a list or in a column-oriented Details view. A separate web view option, independent of the icon arrangement you've chosen, lets you add web-style information panels around the display of icons.

When you turn on web view, Explorer uses HTML templates to customize your view of files and folders. You see more information at a glance, and for a modest investment of programming time, you can even create custom views that make it easier for other users to navigate through folders. With web view turned on, an ordinary folder display changes to resemble the one in Figure 3.1.

FIG. 3.1 When you choose web view, Explorer displays extra information about the current folder and files within it.

The default web view includes four standard elements:

Web view works in folder windows and in the contents pane of a two-pane Explorer window.

Top 

Using Web View with Folders

If you've selected web style navigation, web view is turned on for all folders by default. If you've selected classic style navigation, web view is disabled for all folders by default. With custom settings, you can choose whether to enable or disable web view by default.

Regardless of the global settings, you can turn web view on or off for any folder. The web view menu choice is a toggle: If web view is on, choose View, As Web Page to restore the current folder window to a normal Explorer view.

Setting this option for one folder window does not have any effect on other folder windows. However, if you turn on web view using the two-pane Explorer view, your preferences apply to all folders you view in the current Explorer window.

Top 

Displaying Thumbnails and File Information

When you choose web view and select any file, the info panel at the left side of the window displays that file's name, its file type, the date it was last modified, and its size. If you select a folder icon, the info panel shows the name only.

When you select multiple files, the info panel displays a different set of details. You'll see a count of the number of items you've selected, the total combined size of the selected files (useful if you're planning to move or copy files to another folder), and a column listing the name of each selected file (see Figure 3.2).

FIG. 3.2 When you select multiple documents in web view, you see these summary details in the info pane.

Below the info panel, the default web view template includes a thumbnail image of certain file types. Only a handful of file formats appear as thumbnails in web view. Those that do include Document files; Bitmap, GIF, and JPEG images; and web pages in HTML format (if the page is stored locally or in your browser's cache). If you create a document with one of the applications in the Standard edition of Microsoft Office 97, you can see detailed information about the file, along with a thumbnail image of the document.

 


TIP: If you're an Office 97 user, taking advantage of web view requires some extra effort. By default, Word and Excel files do not display thumbnail images unless you choose File, Properties, click the Summary tab, and check the box labeled Save Preview Picture. Similarly, the info panel displays the name of the author and other file properties, but only if you go out of your way to add that information in the Summary dialog box.

Can you turn on thumbnails for a given file type? Unfortunately, the answer is no. In theory, any application can add thumbnail support if the developer integrates its file formats with the WebViewFolderContents object; that's the ActiveX control that adds web view capabilities to the Windows Explorer. If an application includes this feature, it should appear automatically, without extra effort on your part.

 


TROUBLESHOOTING:

 

I've turned on web view, but I can't see a thumbnail view in some folders. The folder window you're using may be too small. Maximize the folder and see if thumbnails appear. When you restore the drive or folder to a window, try resizing it, watching the changes in web view as it decreases in size. The banner along the top becomes more compact, and the thumbnail viewer goes away when the window reaches a certain size.


Top 

Using Web View with System Folders

A handful of system folders use custom web view templates. When you display the My Computer folder in web view, for example, you'll see a display like the one in Figure 3.3.

 


NOTE: Although it's easy to forget this fact, the Windows desktop is just another Explorer folder, minus the window borders, menus, and toolbars. When you turn on the Active Desktop and display web content on the desktop, you've actually told Windows to display the desktop folder in web view. IE4 automatically generates a custom web view template, called DESKTOP.HTT, every time you customize your Active Desktop settings. Although it's theoretically possible to find this template and edit it manually, doing so is not recommended. 

Other system folders have custom web view templates, including the Control Panel and Printers folders. Table 3.1 lists the built-in web view templates you'll find in a typical Windows 98 installation. All of these templates are stored in the Windows\Web folder.

FIG. 3.3 You'll see detailed drive information when you turn on web view in the My Computer folder.

Table 3.1  Built-in Web View Templates

 
Template File Description
CONTROLP.HTT Displays help text in the Info panel when you select individual Control Panel icons. Includes hyperlinks to two Microsoft web pages.
FOLDER.HTT The default template Windows uses when you customize web view options for a folder. Editing this file does not change folders you have already customized.
DESKMOVR.HTT Provides support for Active Desktop objects. Do not edit this file.
MYCOMP.HTT Displays information about selected local and network drives in My Computer; also displays help text for system folders.
PRINTERS.HTT Offers instructions for setting up a new printer; selecting the printer icon displays the number of messages in print queue.
SAFEMODE.HTT Contains information and troubleshooting links for resolving problems when Active Desktop crashes.
DIALUP.HTT Displays information to help you use the Dial-Up Networking folder.
NETHOOD.HTT Provides an explanation of the contents of the Network Neighborhood.
RECYCLE.HTT Includes JavaScript links that let you empty the Recycle Bin or restore all its contents at once.
SCHEDULE.HTT Explains how the Scheduled Tasks folder works.

 


CAUTION: Before editing any of the default templates in the Windows\Web folder, be sure to create backup copies so you can recover the original HTML files if you want to start over.

Top 

Creating Custom Web Views

There's no particular magic to web view. When you display a folder's contents and choose View, As Web Page, you instruct Explorer to look in the current folder for two files:

Windows also includes a wizard that lets you customize the look of a folder by editing the web view template.

 


CAUTION: There's no way to force users to open a folder using web view. If you've designed a custom web page to help other users of your PC navigate in a particular folder or to simplify file access for coworkers on a network, your work will only pay off if they choose to use web view. If they access the custom folder using a version of Windows that does not include the Windows Desktop Update, they cannot view your changes.

Top 

Using the Web View Wizard

To customize the appearance of a folder in web view, choose View, Customize This Folder. That action launches the wizard that appears in Figure 3.4. Note that, as wizards go, this one is fairly crude.

When you choose the option Create or Edit an HTML Document, the wizard launches Notepad and loads the HyperText template specified in DESKTOP.INI. If this is the first time you've used the wizard in a given folder, it copies the FOLDER.HTT template file from the Windows\Web folder. When you finish editing the file in Notepad, you can close the Customize This Folder dialog box and return to the folder to see your changes.

The second option, Choose a Background Picture, enables you to add a background graphic behind the file list control on the web view folder. You can use any file in any standard graphic format, including Bitmap, JPEG, or GIF. To see how this works, start the Customize This Folder Wizard and follow these steps:

FIG. 3.4 Use this wizard to edit the web view template or add a background graphic to a folder.

1. Select Choose a Background Picture. Click the Next button.

2.
The next dialog box (see Figure 3.5) displays a list of graphics files from the \Windows folder. Click the Browse button to choose a different folder, if necessary.

FIG. 3.5 Choose a background image to appear behind the file list control in web view. Pick a light image that won't obscure icons.

3. As you click on graphics files in the list, the contents of the file appear in the preview window at the left of the dialog box. If the graphic is small, Windows tiles the image to fill the preview box.

4.
When you've selected an appropriate graphic file, click the Text button to choose a contrasting color for icon labels that will appear on top of the graphic. You might also want to check the Background check box and adjust the color that is to appear behind the icon labels.

5.
Click Next to record your changes, then click Finish to close the wizard. You might have to press F5 to refresh the folder's contents and see your changes.

 


TIP: If you must use a graphic behind the file list control, choose a light image, preferably in a shade of gray. Dark or detailed images such as photographs can make it difficult to see icons in the file list.

Top 

Editing a HyperText Template

To edit a HyperText template, you need to be fluent in HTML--and you won't be able to fall back on the WYSIWYG editor in FrontPage Express. By default, when you choose to customize the HyperText template file for a folder, Windows dumps you into the most rudimentary HTML editor imaginable: Notepad.

Some sections of FOLDER.HTT are strictly for web experts. Don't edit the scripts that display file information, for example, unless you're sure you know what you're doing. But even an inexperienced editor can safely add hyperlinks to the default folder template.

 


NOTE: Future updates to Windows and Internet Explorer might include more complex templates for customizing folders. In that case, you might need to adjust the instructions that follow to deal with the revised HTML code. 

The default folder template includes a section where you can add your own hypertext links to web pages or files. (Open Control Panel and turn on web view to see examples of these links.) To customize this section, use the Customize This Folder Wizard to open FOLDER.HTT for editing in Notepad. Then follow these steps:

1. Choose Search and enter the following text in the Find What text box: A FEW LINKS OF YOUR OWN.

Then click Find Next.

2.
The HTML code in this section includes two sample URLs. Replace the two sample URLs with your own link, and replace the link text ("Custom Link 1" and "Custom Link 2") with your own label.

3.
To create additional links, copy the two lines that follow the first sample link, and paste them below the second sample. Repeat for any additional links, and then customize as in step 2.

4.
Delete the comment tags above and below the links to make them visible in web view. When you finish, the code should look like the sample shown in Figure 3.6.

5.
Close Notepad, saving the file with the default name. Then press F5 to refresh the folder view and see the links in place.

FIG. 3.6 Edit the HyperText template to add links that appear in web view. Note that links can include web pages, folders, or filenames.

Top 

Removing Custom Web View Settings

If you've customized a folder's web view template and you're not happy with the results, use the wizard to delete your changes and start over. The procedure is simple:

1. Choose View, Customize This Folder.

2.
Select the Remove Customization option, and then click the Next button.

3.
A dialog box appears, warning you that you're about to delete FOLDER.HTT and remove custom settings from DESKTOP.INI. Click Next to continue.

4.
Click Finish to close the wizard. You'll see the default web view settings for the current folder.
Top 

Advanced Customization Options

There's no limit to the amount of customization a skilled HTML author can perform. As you learned earlier, you can create your own HyperText template file, giving it any name. Store it in the folder you want to customize, and then open DESKTOP.INI and enter the name of your custom HTML file after the PersistentMoniker= entry.

 


TIP: Remember, both DESKTOP.INI and FOLDER.HTT are hidden files. To edit either one without using the wizard, you may need to adjust Explorer's options to show hidden files.

Although most users will specify an HTML file in DESKTOP.INI, you have the option of calling out a web page in this file. This option is not officially supported, but it works just the same. You can point a folder to a page on the Internet or your intranet. The effect is a bit baffling: Although the Address bar displays the name of the folder, the Explorer window shows the web page listed in DESKTOP.INI.

To use the file list control in a custom web page, open the default FOLDER.HTT file and copy the file list code to the Clipboard. Then paste it into your custom HTML document. Look for this block of code:

<object
classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2">
</object>

You also might have to add a Position statement to place the control where you want it to appear on the page.

 


ON THE WEB: For ideas on how to create useful custom web view pages, check out the following article on the Microsoft SiteBuilder Network:

 

http://www.microsoft.com/workshop/prog/ie4/folders.htm


Top 

                               

                                Next

Hosted by www.Geocities.ws

1