Notes about templates

Templates are a new feature in MyWord Editor v0.60.

I think the measure of a CMS is how well the templates work.

#### This page uses the "plain" template

I've tried to make this as bare-bones as possible. It's sort of the "hello world" of templates. A good starting point for a new one.

#### What makes for good templates

Here are some of the criteria.

1. Designers create templates, writers use them.

2. It's a platform.

2. It should be easy for the writers.

5. It should be easy for sysops to configure/maintain.

3. For the designers, there are a variety of factors: power, reusability, ease of maintaining, stability of the platform.

4. And of course for readers, it should be a joy, a thrill, an inspiration, and the design should fade into the background and the ideas should pop to the front. The goal of good design is to get out of the way. Suspension of disbelief.

#### How writers use it

There's a new popup menu that lists all the available templates. Choose the template you want, and click Publish.

#### How sysops configure it

In config.json, there's a new struct called templates. Each item in the template is a string, whose name is the name of the template, and the value is the URL of the template file. The file is read every time the page is rendered.

This means the designer can modify the template without it having to be installed. Of course the sysop has control over whether they want to give this power to the designer, you can always make a copy of the template file and point to that instead of the original. I like to delegate to designers I trust, and stay out of the loop.

#### The template language

You can design a template so that values are substituted at render-time, or they can be generated by JavaScript code when the page loads. There are advantages to both approaches. In some circumstances I do both, to get the best of both.

It should also be possible at some point to give the *reader* the ability to specify the template. One of the benefits of using the same language everywhere.

#### More info

Here's the post where Templates were announced on the MyWord blog. Things are still pretty disorganized docs-wise, the product is still coming together. :-)