Michael McDonald's Blog

Noel 0.9.6 update: CopyTag, WrapTag and Closures

In my Noel project I have been making several improvements to the ways that custom tags can be modified. Three recent additions in Noel version 0.9.6 are , and closure tags.

The tag is the inverse of . is ideal for top-down construction, e.g. starting with an HTML page template and inserting content for sections, sub-sections and individual pages. is ideal for bottom-up, component-oriented construction. E.g. adding a

around an existing tag, or adding conditional logic to an existing tag that changes how it is rendered or whether it appears. (Software developers may recognize the Decorator pattern at work here.)

The tag is pretty straightforward: you can make a copy of an existing tag (including content, local variables and local tags). Tags can be built up and then branch off in different directions. Complex tags can be built up and copied as in the Prototype design pattern.

Custom Noel tags are by default standalone tags. When you define , you just use in your source--there is no . Closure tags are tags that have both an opening and closing tag when used, e.g. inserted content.

For more information see the Noel Tags documentation

link  |   |  12/2/08 01:01pm
home  |  acting  |  blog  |  consulting  |  noel  |  contact
© 2013 Michael McDonald, . All rights reserved.