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:
| Option | Description | Example |
| template | Name of the template to be rendered. | {template, "home.tpl"} |
| anonymous | Render the template always as the anonymous user, even when an user is logged on. Defaults to false. | {anonymous, true} |
| content_type | The 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.