Go to page content


Show a rsc as a HTML page.

This Webmachine resource is used to show the HTML page of a rsc. When the page with the supplied id is not found then a 404 is returned. A logon page will be shown when the current user is not allowed to view the page.

This resource also adds a “noindex” response header when the page's “seo_noindex” flag is set.

Example dispatch rule:

{page, ["page", id], resource_page, []}

Resource_page has the following dispatch options:

templateName of the template to be rendered. Defaults to “page.tpl”{template, "about.tpl"}
idId of the page (rsc) to be shown. This overrules any id in the query arguments.{id, page_about}
catThe category the page (rsc) that is requested has to be. If a page of a different category is requested, a 404 is shown.{cat, text}
What ACL action will be checked. Defaults to 'view'; but can also be 'edit' if users need edit permission on the rsc to be able to access the resource.
{acl_action, edit}

Resource_page handles the following query arguments:

idThe id of the page (rsc) to be shown. This can be the numerical id or the unique name of a page./page/1234

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