Builds a page or email template definition contributed by an app, so content editors can create pages from it. Obtained from templateDefBuilder on the controller mappings. Set the title, whether it is a content or theme template, the page type and the editor to open it with, then call build to register it. Choosing the EDM editor also switches the template to an email prototype and clears the theme flag. Registration is skipped once the app's engine has finished initialising.

Group: Builders


Methods

path(String path)

Returns: TemplateDefBuilder

Sets the repository path of the template file.

ParameterDescription
pathrepository path of the template file

name(String name)

Returns: TemplateDefBuilder

Sets the template's title. Note that despite its name this sets the title rather than the file name, which is given to the builder when it is created.

ParameterDescription
namethe title to show for the template

title(String title)

Returns: TemplateDefBuilder

Sets the title shown for the template when a content editor chooses one.

ParameterDescription
titlethe template title

isContent(boolean isContent)

Returns: TemplateDefBuilder

Sets whether users may create new content pages from this template.

ParameterDescription
isContenttrue to offer the template when creating content

isTheme(boolean isTheme)

Returns: TemplateDefBuilder

Sets whether this is a theme template rather than a content template. It is forced to false when the EDM editor is selected.

ParameterDescription
isThemetrue to register the template as a theme template

pageType(String pageType)

Returns: TemplateDefBuilder

Sets the page type of the template, which is what groups it with other templates of the same kind.

ParameterDescription
pageTypethe page type identifier

editor(String editor)

Returns: TemplateDefBuilder

Sets the editor used to modify pages made from this template. Setting it to edmEditor makes the template an email template.

ParameterDescription
editoridentifier of the editor, for example edmEditor

build()

Returns: TemplateDef

Creates the template definition from the configured values and adds it to this app's templates. Returns null and registers nothing once the app's engine has finished initialising.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.