Cloaking Files and Folders


While you are developing your Website, you might want to prevent certain files from being uploaded or downloaded. For example, if you have a large number of Flash and QuickTime movies embedded in your pages, you might not want to replace those Flash and QuickTime files in your local folder or on the remote server every time you get or put filesbut you might want other dependent files to be automatically uploaded. You might also have source files for graphics in your local foldersource files are typically not uploaded to remote servers because they are not necessary for visitors to view the Web pages and they can take up a great deal of space.

You can cloak folders or file types to exclude them from site transfer functions including Synchronize, Get and Put, and Check In/Out. Cloaked folders and file types are also excluded from site-wide operations such as select newer local and newer remote, checking links, search/replace, reports, and library/template updating. Cloaked folder and file types do not appear in the Assets or Files panels.

Note

Cloaking, like many Dreamweaver site functions, is not recognized by other FTP programs. The data needed by Dreamweaver to maintain information on the folders you will cloak in this exercise will be contained in the Library folder. This folder takes up very little space and should not be deleted from either the local or remote locations.


1.

In the Local Files pane of the Files panel, select the PNG folder that is located in the Lesson_14_Sites folder.

This folder contains a PNG file.

You cannot cloak individual files; you must cloak either entire folders or all files of a certain file type.

Tip

A good way to organize your site is to keep all your media files together in the same folder. For instance, if your site has a large number of Portable Document Format (PDF) files, creating a folder solely for PDF files will help keep your site organized and make it easier to maintain.

2.

Click the Options menu and choose Site > Cloaking > Cloak (Macintosh only) or right-click and choose Cloaking > Cloak.

Note

Cloaking should be turned on by default, but if the Cloak option is grayed-out, you should click the context menu and choose Site > Cloaking > Enable Cloaking (Macintosh) or choose Site > Cloaking > Enable Cloaking (Windows). Macintosh users can also Ctrl-click to access the context menu and cloak settings.

The PNG folder icon is now displayed with a diagonal red line across it in both the Local Files and Remote Site panes of the Files panel. The diagonal red line indicates that the file has been cloaked and will be excluded from site operations. If you open the folder, you will see that the Yoga-Sangha.png file also has a diagonal red line through its file icon.

Tip

You can uncloak the folder to include it in site operations by right-clicking or Ctrl-clicking (Macintosh single button mice) the folder and choosing Cloaking > Uncloak.

3.

Right-click or Ctrl-click (Macintosh single button mice) the PNG folder and choose Cloaking > Settings.

The Advanced tab of the Site Definition dialog box will open with the Cloaking category selected.

4.

Check the Cloak Files Ending With: checkbox. Click in the text field at the end of the list of default file extensions already in the text field. Press the Spacebar and type .pdf into the text field.

You can insert additional file extensions into the text field to cloak more than one kind of file. To cloak multiple file types, the extensions must be separated by a space, as demonstrated by the default .png .fla extensions that were originally listed in the text field. Fireworks source files use the .png extension; Flash source files use the .fla extension. You can also insert extensions for other common source files, such as the .psd Adobe Photoshop file extension.

5.

Click OK to close the Site Definition dialog box and click OK when Dreamweaver tells you that the cache will be re-created. Click the Refresh button on the Files panel when the process is complete.

All PDF files contained in the Yoga Sangha project site are now cloaked. There is a PDF file in the Lesson_14_Sites folder that is now displayed with diagonal red lines through its file icon: ysSchedule.pdf. All PDF files are now excluded from site operations.

Note

To uncloak file types, click the context menu on the Assets panel group (Macintosh) or the Files panel group (Windows) and choose Site > Cloaking > Settings. In the Site Definition dialog box, either remove the specific extension from the text field for the file type that you want to uncloak or uncheck the Cloak Files Ending With: checkbox to uncloak all file types.

6.

Right-click or Ctrl-click (Macintosh single button mice) anywhere within the Local Files pane of the Files panel and choose Cloaking > Enable Cloaking.

The checkmark is removed from the Enable Cloaking option to indicate that cloaking is now disabled for the Yoga Sangha project site. This is an easy way to temporarily remove cloaking from your site's folders and files. If you choose Site > Cloaking > Enable Cloaking again, cloaking will become re-enabled, and all previously cloaked folders and files will be recloaked. Cloaking is enabled on all sites by default. You must have cloaking enabled to cloak folders and file types.

Note

You can also choose the Cloaking category from the Site Definition dialog box and uncheck the Enable Cloaking checkbox to disable cloaking for the site. You can also uncloak all folders and file types simultaneously by choosing Cloaking > Uncloak All. This option leaves cloaking enabled and removes cloaking from all folders and files in your site. You cannot automatically re-cloak folders and files if you have used the Uncloak All function. If you want to suspend cloaking only temporarily, you should disable cloaking, as demonstrated in Step 6. Cloaking options are also located under the Site menu on the Files (or Assets) panel group context menu (Macintosh and collapsed File panel on Windows) or in the Site menu (expanded files panel on Windows).





Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

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