17.1 Snippets Basics

     

Snippets aren't fancy or complex, but they sure save time. A snippet is simply a chunk of code that you store away and then plunk into other Web pages. It could be HTML, JavaScript, or any of the other programming languages you might encounter. Dreamweaver comes with hundreds of snippets organized into different folders, like Comments (for adding HTML, CSS, and JavaScript comments) Footers (canned footer designs), and Form Elements (useful form parts like pull-down menus ).

For example, say you always use the same table design to create a sidebar on a page. Each time you want to create a similar table, you could go through all the same steps to build it ”or you could turn that table into a snippet, and then, with a simple double-click, add it to page after page of your site.

You keep these code chunks in the Snippets tab of the Code panel (see Figure 17-1). You access them in any of several ways:

  • Choose Window Snippets.

  • Press Shift-F9.

  • Click the Snippets tab on the Code panel.

Above and beyond Dreamweaver's preinstalled snippets, you can quickly build a collection of your own.



Dreamweaver MX 2004. The Missing Manual
Dreamweaver MX 2004: The Missing Manual
ISBN: 0596006314
EAN: 2147483647
Year: 2003
Pages: 191

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