Dreamweaver Snippets

Dreamweaver 8 snippets

Dreamweaver 8 has got so many little features that make coding easier.

I’m in the process of converting a flat HTML website into something more palatable for the Joomla! CMS I’m using. The old website has something like 1500+ pages of HTML with some articles being MANY pages long… e.g. there’s one article that consists of 34 pages.

Now, Joomla! handles articles differently: One long page of HTML can be pasted into the WYSIWYG  editor and then you designate where the page breaks are going to be using the code {mospagebreak}

  • To type this out every time is a chore!
  • To cut & paste is OK, but what if there’s a ton of other stuff on the clipboard?
  • To cut & paste from, say, Notepad or Word is OK, but you have to keep maximising the program to grab the snippet

Dreamweaver 8 has this handy little function for creating, storing and re-using snippets of code in the snippets panel of the interface.

Here’s how to do snippets in Dreamweaver 8:

To insert a code snippet:

  1. Place the cursor at the insertion point where you want to insert the code snippet, or select code to wrap a snippet around.
  2. In the Snippets panel (Window > Snippets), double-click the snippet.
    You can also right-click (Windows) or Control-click (Macintosh) the snippet, then select Insert from the pop-up menu.

To create a code snippet:

  1. In the Snippets panel, click the New Snippet icon at the bottom of the panel.
  2. The Snippet dialog box appears.
    Complete the dialog box and click OK.

So there you have it. Code Snippets. Quick & handy. Use them on big projects to save valuable time and avoid the tedium 🙂

Scroll to Top