Using Dreamweaver MX Snippets

Snippets are a new tool that allow you to collect and manage sections of Code. In many ways the Snippets Library is a code library.

In this article you will learn how to use Snippets in Dreamweaver MX and how to create your own Snippets.

 

Templates and Library Items

As you can see for Snippets to be effective you need to know how the code you are using from the library interacts with the HTML on the page. Snippets of JavaScript cannot be simply dragged on to the page.

In some ways, a Snippet is a relation to Dreamweaver's Templates and Library items.

The base functionality of a Template and Library Item is to give you a tool to manage the layout of the page. A Template manages the entire page and a Library Item manages a section of the page.

The advantage Templates and Library Items give is site wide management. When you change a Template all web pages using that given template will update to the new changes. Library items are the same. Snippets are not. The function of a Snippet is not to be updateable. 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.

Matthew David

Matthew David has been developing Flash based applications for over 6 years (that makes him very old in this business!). Examples of his work can be found at his web site www.matthewdavid.ws, or you can email him directly at mdavid@email.com.

Matthew’s most recent publications include content for Flash 5 Magic, Inside Dreamweaver 4, Flash 5: Visual FX, Web Publishing Bible and The Dreamweaver Bible. You can also see him popping up in many online magazines, such as Sitepoint.com, Windowatch.com, UDzone.com and DevX.com.

Currently, Matthew is working on two books and writing articles for Element K Journal’s Macromedia Solutions magazine. He is a available as a freelance consultant to work on web based projects.

See All Postings From Matthew David >>

Comments

Be the first to write a comment

You must me logged in to write a comment.