Template set

Concept

Template are used by a large number of components in iKnowBase. The template set feature allows you to define links to existing templates or/and create new inline templates used by the specific component.
This chapter will focus on the user interface where you define such template set.
To read more about scripts and templates, see Using Scripts and templates in the iKnowBase API Reference.

Features of Template set:

Properties

This section describes the properties of an template set.

Property Description
Add Shared template

Choose among shared templates for the specific component type. Only templates with the same template type as the context you are in will be available.

Add Inline template

Create a local, inline template used only by this component.

Action

The following actions are available:

  • Move up/down: Move a template up or down in the set
  • Delete: Delete the template from the template set
  • Copy: Will create a new inline template
  • Share: Will convert a inline template to a shared template
  • Detach: Will convert a shared template to an inline template (only if the template is used by one component)
Ident/label

Name of the template in the set. The default template will be the first template in the component.

Inline/shared

Displays if its a shared or inline template

Template

For shared templates it will let you either go to the selected templated or call a popup to select another one. Inline templates are maintain within the component in a separate tab named after the ident of the template.

Implementation

Displays the implementation type

Inline templates

This section describes how to maintain an inline template. Shared templates are described in Templates in the DevelopmentReference.

First, the inline template will be available as a separate tab named like Ident name you gave.

Multiple inline templates will create multiple tabs.

The screen to maintain the inline tab looks like this:

Property Description
Template type

The value is given by the context. e.g a inline template for a presentation style will set the template type to Presentation style.

Implementation type

Select the appropriate implemetation type. Choose between the following options:

  • FreeMarker template
  • Groovy template
  • Groovy XMLtemplate
  • Groovy script
  • Html Script
  • JavaScript
Template

Type the template code using the appropriate syntax (FreeMarker, html, javascript or Groovy). Click on the label to enter a full screen editing mode, where you can use CTRL+S to save.