PageRender::render()

Return a string with the rendered output of this Page from its template file (other usages available as well)

Note: If the page’s template has caching enabled, then this method will return a cached page render (when available) or save a new cache. Caches are only saved on guest users.

Available since version 3.0.253.

Usage

$string = $pageRender->render(Page $page, array $options);

Arguments

NameType(s)Description
$pagePage
$optionsarray

Return value

string mixed

Exceptions

Method can throw exceptions on error:

  • WirePermissionException or Wire404Exception or WireException


PageRender methods and properties

API reference based on ProcessWire core version 3.0.253