Go to page content

resource_template

Show a template.

This Webmachine resource renders the template configured in the dispatch rules.

Example dispatch rule:

{home, [], resource_template, [{template, "home.tpl"}]}

It has the following dispatch options:

OptionDescriptionExample
templateName of the template to be rendered.{template, "home.tpl"}
anonymousRender the template always as the anonymous user, even when an user is logged on. Defaults to false.{anonymous, true}
content_typeThe content type provided by the dispatch rule. Defaults to “text/html”.{content_type, "text/html"}

This resource does not handle any request arguments.

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.