• Content Templates

    By Ethann Castell 2 decades ago

    I think that the Wiki would benefit from Content Templates. By this I mean that when I create a new Wiki entry I would have the option of selecting a template to structure the content, kind of like a simple form. These templates could be tied into content categories. The template would only contain some basic headings but this would provide enough of a common structure to the Wiki entries.



    As an example, lets say that that our Wiki contained a category called Fish. If I add a Fish entry to the Wiki then it would be auto-populated with several headings: Name, Species, Population, Habitat, Recipes, Web Links. I would then fill out the information under each of these headings. When the entry is saved then it would look similar to all the other Fish entries in the Wiki. Obviously I could override the pre-defined headings if I liked, but hey it's a Wiki.

    • I second this

      By JMark Murphy 2 decades ago

      I was asking for this internally, just to see if it could be done quickly by us. But if you do it, then it would benefit all.

    • A more general implementation.....

      By Dave Parillo 2 decades ago

      The concept of 'template' in many wikis is far more general than this. It's an extension mechanism that doesn't require mucking about in the Notes Design. Having a way to "register" extensions with the wiki would allow a very general way to create templates plus much more. One type of template might simply place a bunch of predefined text in the template location in the document & destroy itself in the process - the simplest kind of template. If the extension mechanism allowed javascript, you'd open up dominowiki to include just about anything you could script - plus the extensions would be open to folks without a notes developer license.



      I don't know enough about dominowiki internals yet to have a well formed idea of how a plugin system might work, so the rest of this may ramble a bit….



      The basic format of a template might be

      {templateName}

      template dependent body text. Not all templates would need this.

      {/templateName}



      The template name could be be the basename name of a javascript resource file that had been "registered" with the wiki. Maybe a new function in wiki.js? Each of these plugin resource files would have a run() function that would get called when it's template was encounted during processing. I know the current page processing is in LotusScript and I don't know if it's even possible to call javascript like this from the lotus script tahts transforming the page. Also don't know if this might kill the wiki performance - I currnetly think domino wiki rates pretty well on performance.



      Rambling some more, I see 3 different kinds of templates:

      1. The most basic is a "copy function" - it merely pastes in place the contents of a wiki page defined elsewhere. It's just shorthand for stock content - no modifications.


      2. The next level os complexity is a template that takes arguments - i.e. {Template:Calendar June 2006}


      3. Some templates might be "destructive" - they's destroy the original markup, replacing it with the new text. i.e. as an alias for the current user name and timestamp.


      4. Last & most complex, a template as a front-end essentially for a script.