Tuesday, September 04, 2007

Documenting ColdFusion custom tags in Dreamweaver (1/4)

Part 1: Introduction

I've been meaning to post on this topic for a bit, and after reading Ray Camden's post on custom tags, I thought now would be a good time. I realize that a lot of developers use CFEclipse these days, but for those who use Dreamweaver or have others sharing a server that use Dreamweaver, documenting custom tags within Dreamweaver can be quite helpful. In our case, we have application developers and editors/designers that share templates and other UI elements. We've also used this technique to encapsulate complex capabilities into simple tags for our editors/designers.

During these articles we're going to look at a fictional tag called <cf_ourtemplate> that contains attributes of "title" and "theme". Our tag has two themes called "basic" and "full". How the tag functions and what those themes are is irrelevant to this exercise, so I'll leave that to your imagination. When we're done we should have something that looks like the following.

In order to bring this to life, we're going to need to create

  • a cf_ourtemplate.vtm, cf_ourtemplate.htm, and TagChooser.xmlile to define the inline hints and the tag editor
  • a Reference.xml, default.htm, and a ourtemplate.htm file for documentation
  • a .mxi file to make installing into Dreamweaver easier

It is not my intention for this series to be an exhaustive reference. To that end, in instances where a more detailed reference is available, or where the reference code is self-explanatory, I'll keep my explanations to a minimum. In the second part, I'll discuss creating the vtm and htm files for basic tag editing. Before moving on, you may wish to download the source code.

Labels: , , ,

posted by Luis

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

Template design by MLP Design
Licensed under CC-NC 3.0