Experiment: Customizing the outline template

People want to customize the default templates without having to replace them.

CSS, scripting and the glossary make this possible.

The experiment

I've added a feature to the default template for the outline type. If it works, we'll add it to all the types. It will become a standard feature of the CMS.

There's a new macro, <%customStylesScripts%> that's defined in the global glossary to be empty.

The macro is referenced at the end of the <head> section of the outline template.

You can add this to your glossary. Anything that's contained within it will appear at the end of the <head> section in all pages on that site that use the outline template. If you haven't done any template customization this will be most of the pages on your site.

Example

I've added this macro to the glossary on the docs site (the one you're reading now).

If it worked this text will be green.

It worked, because the text is in a span with a class of greenText, and my glossary entry defined greenText as green bold text.

Here's a screen shot of the definition of <%customStylesScripts%> in my glossary.

The plan

If it works, I want to make this a standard feature of all the default templates, and welcome other template designers to include it as well.

What do you think?

Personally, I think it's a very neat solution, low tech, and makes a nice use of a feature we already have. The glossary is perfect for this application. But there may be problems, or ways to make it rock much more. Your comments and suggestions are welcome.


Posted: Fri, 02 Aug 2013 13:50:00 GMT