vertx / io.vertx.ext.web.handler / TemplateHandler

TemplateHandler

interface TemplateHandler : Handler<RoutingContext>

A handler which renders responses using a template engine and where the template name is selected from the URI path.

Author
Tim Fox

Properties

DEFAULT_CONTENT_TYPE

static val DEFAULT_CONTENT_TYPE: String

The default content type header to be used in the response

DEFAULT_INDEX_TEMPLATE

static val DEFAULT_INDEX_TEMPLATE: String

The default index page

DEFAULT_TEMPLATE_DIRECTORY

static val DEFAULT_TEMPLATE_DIRECTORY: String

The default directory where templates will be looked for

Functions

create

open static fun create(engine: TemplateEngine): TemplateHandler
open static fun create(engine: TemplateEngine, templateDirectory: String, contentType: String): TemplateHandler

Create a handler

setIndexTemplate

abstract fun setIndexTemplate(indexTemplate: String): TemplateHandler

Set the index template