Dreamweaver Snippets, Make Coding Easier

An article by Dubtastic
http://dubtastic.com

For those of you who use Dreamweaver, I am sure that if you are anything like me, there are endless times where you are copying code from a previous project and pasting it into a current project. Whether it is a contact form, JavaScript, PHP, or basic HTML, you can use Dreamweaver Snippets to take make your life a lot easier. This might be basic, or simply a review for a lot of you, however, if you have not used Snippets, then keep reading.

I grew tired of having to always find a certain set of code in my projects folder and many times had to hunt for it. Well, Dreamweaver makes that much easier with Code Snippets. For example, let's take the iFrame code that is on the Dubtastic site. Instead of copying and pasting from other pages, I made that into a Snippet. Here is how:

Find the code that you want to make into a Snippet. For the purpose of this example, I have selected iFrame code. Highlight that code and chose "Create New Snippet". Note: When making it a snippet, try to make it generic enough or add in some comments above the code that explain how to use it if you think that you might forget certain variables or settings later on.

Dreamweaver Snippets, Make Coding Easier

Your Snippets are viewed from the toolbar in Dreamweaver under the "Code Section":

Dreamweaver Snippets, Make Coding Easier

So let's say you have a new project that needs an iFrame, now you can just browse to the Code section of the Dreamweaver toolbar, and double click on the Snippet you want to insert, and it is automatically added to your page! No hunting around for code as it is right there in the program for you.

If you want to share your Snippets with others, they are stored here:

C:\Documents and Settings\Your User Name\Application Data\Macromedia\Dreamweaver MX\Configuration\Snippets


This tutorial/article prepared by Dubtastic
Website: http://dubtastic.com
Contact:
No portion of this tutorial/article may be reproduced without prior permission.

Close This Window