|
Snippets are a powerful addition to the Dreamweaver toolset. They make it easy to save blocks of code that you use and reuse in several different places on your site.
Snippets are not updateable throughout your site such as Templates and Library items. It is a useful section of code you can add to any part of your page and easily
tweak. Add the same Snippet to another page within your site and tweak that
Snippet. There will be no update throughout your site. Snippets give you useful
code, not site management.
Average
5 minutes or less
control panel example
1. Open Dreamweaver and in the Window menu, choose Snippets. Or you can hold down the shift key and press F9 (Shift-F9) to open the Snippets Panel. You will immediately see the pre-installed snippets, many of which are very handy.
2. Click on the folder icon at the bottom of the snippets panel (See the panel control example above) to add a new folder and give it a title. For ease of use, it is always good practice to organize your snippets into folders.
2. Highlight the text or code you wish to turn into a snippet (or you can type it in later if you don't have it now).
3. Click on the New Snippet icon. It looks like a file with a plus sign..
4. Give your snippet a title.
5. Give your snippet a description (optional).
6. If the snippet is to wrap around text on the page, choose "Wrap selection", or if you want a single block, choose "Insert Block".
7. If you did not have any code highlighted, you can add it manually now.
8. Choose how you want the preview in the snippet pane to display - as code or design.
9. Click OK
10. Place your curser on the pages where you want a particular snippet to occur locate the snippet in the Snippets Panel, click on it and click Insert or simply double-click the snippet.
11. That's it! This is a fantastic timesaver great for footers, contact info, copyright or anything repeated in several places on you site.
12. Always edit your snippets using the Snippet Panel by clicking on the Edit Icon. It looks like a file with a pencil. (See the panel control above).
- Don't forget to check out DW's pre-installed snippets. There may be one or two there that would help you manage your site.
- Find the file corresponding to the snippet that you want to share in the Configuration/Snippets folder in the Dreamweaver MX application folder.
- Copy the snippet file to a shared folder on your computer or a network computer.
- Have the other members of the team copy the snippet file to their Configuration/Snippets folder.
|