← Back to team overview

zim-wiki team mailing list archive

Re: Discuss wish: Page templates

 

Vlastimil Ott wrote:
trying to create an address book with Zim. I would like to create a person record with items like Name, Phone, Mail, Jabber and so on - you know. One thing would really help me a lot. A special namespace called templates. I could create a template (with mentioned items) and select it later when pressing Ctrl-n. When creating i.e. address book, this seems to be a great thing. I could create such templates right now, but how to select them? I think that the one and only thing to be done is to implement the radiobutton/list and load the template in the New page dialog. See my mockup.

Implementation like that is relatively easy. Need to modify the "new page dialog". In the notebook there is already a hardcoded template for the calendar pages, so this can easily be extended. You can even have some template instructions like the ones used in the export templates.

The main design question for me is whether we should use a normal namespace for this, or there a need to create "special" namespaces? I run into the same question trying to implement a "move to garbage" feature - again the garbage bin can be a regular namespace, but it could also be a special namespace.

( By having a special namespace for templates I mean that you would still be able to use the namespace "templates" for any other purpose. The templates would e.g. be in a folder "_templates" (normal page names can not start with '_') and show up e.g. at the top of the index tree. )

Implementing special namespaces would need some more thinking, but may be the Right Thing To Do because it keeps notes and "meta" information separate.

Regards,

Jaap



Follow ups

References