Click here to show or hide the menubar.

Templates, again


Each nodetype has a template.

For each nodetype, you can accept the default template, or you can redefine it.

Same for the overall template. We provide a default, and it will be updated as necessary, but you can switch it off, and replace it with your own.

The user gets to say whether the template for a nodetype "takes over" the display, or is rendered within the page template.

Design

RPC handlers that: 1. Open a template. 2. Delete a template.

A new sub-table of the user's worldOutline.editor table, called templates.

Indexed by the name of a nodetype. "main" for the main template.

Each item is a table. Must be possible to have booleans and perhaps other values that are quickly accessible by the renderer, that might be set as the template is saved. Example, a bit that says whether the nodetype takes over the display or is rendered through the main template.

A nerdy command in the OPML Editor called Open Template. Prompts you for the nodetype.

Two buttons on the window, Save and Delete.

Parts

worldOutlineSuite.initUser

worldOutlineSuite.templates

worldOutlineSuite.setDefaultAtts

worldOutlineRpcHandlers.deleteTemplate

worldOutlineRpcHandlers.getTemplate

worldOutlineRpcHandlers.saveTemplate

worldOutlineSuite.getTemplateText

opmlEditor.worldOutline.buttons.template

opmlEditor.worldOutline.deleteTemplate

opmlEditor.worldOutline.init

opmlEditor.worldOutline.openTemplate

opmlEditor.worldOutline.saveTemplate


Posted on Wednesday, March 07, 2012 at 2:50 PM by Dave Winer.