I’ve recently written on the usefulness of creating snippets in Dreamweaver CS5 for easily and instantly reusing long, complex pieces of code that recur through your document. What if you work with a team of web developers, however, with whom you take turns working on the site? You’d certainly want to share your innovative, time-saving snippet with them to make their lives easier, as well. How would you do that, though?
For instance, I recently had to correspond with an associate who is developing a class for the first time using Webucator’s HTML-based courseware system. He requested any snippets that I had for the courseware creation. A prime example that I had already blogged about came back: my “Webucator” snippet folder, and my “Exercise” snippet.
The Secret Behind Snippets in Dreamweaver
Snippets are really just files stored in a Dreamweaver directory on your computer. Specifically, the directory is the Dreamweaver directory in the Application Data folder of your Windows account/Mac computer. The path for the directory on a Windows OS would be: C:\Users\[YOUR ACCOUNT NAME]\AppData\Roaming\Adobe\Dreamweaver CS5\en_US\Configuration\Snippets, where you’d substitute “[YOUR ACCOUNT NAME]” for your actual account name.
When you navigate to this folder and compare it to your Snippet panel list, you’ll see that, with the exception of certain special default folders, they reflect each other perfectly.
Going into the “Webucator” folder, I see my exercise snippet as “Exercise.csn”.
Now that you know where Dreamweaver CS5 stores snippets, you can now share them. You can even share whole snippet folders – just zip them up and email them as an attachment.
If you’re sharing a whole encyclopedia of snippets with an entire department, however, a better system would be establishing an SVN repository for your team, which would essentially operate like a shared network folder in which anyone with credentials can add, remove, and edit files. This folder can either be an entirely new one of your own making, or a preexisting one. If you choose to make a preexisting one, an excellent idea for you might be to make your Dreamweaver snippets folder your SVN repository, so that whenever anyone updates the repository, they’re also automatically updating the snippets right within Dreamweaver! I would recommend Tortoise SVN as a good SVN client; it’s what we use at Webucator for our courseware system, and it’s intuitive yet efficient.
Happy snippet sharing!
Snippets are covered in our advanced Dreamweaver CS5 class.



no comments yet