API results for “template”
$templates apivar
Manages and provides access to all the Templates.
wireRenderFile(string $filename, array $vars = array, array $options = /site/templates/) function
Given a filename, render it as a ProcessWire template file
fields(string $name = '') function
Get or save fields independent of templates ($fields API variable as as function)
templates(string $name = '') function
Get or save templates ($templates API variable as a function)
Fieldgroup class
Fieldgroup is a type of WireArray that holds a group of Field objects for template(s).
Template class
Template is a Page’s connection to fields (via a Fieldgroup), access control, and output via a template file.
PagesType class
Provides an interface to the Pages class but specific to a given page class/type, with predefined parent and template.
Markup Cache module
A simple way to cache segments of markup in your templates.
Repeater module
Repeats fields from another template. Provides the input for FieldtypeRepeater.
Templates module
List and edit the templates that control page output
templates($name = '') apivar.method
Access the $templates API variable as a function.
$files->render(string $filename, array $vars = [], array $options = []) apivar.method
Given a filename, render it as a ProcessWire template file
$cache->renderFile(string $filename, $expire = null, array $options = []) apivar.method
Render a file as a ProcessWire template file and cache the output
$procache->getContentTypeExt($item) apivar.method
Get the content-type extension for the given Page or Template
$procache->getCacheTime($template = null) apivar.method
Get the cache time for the given Template, or for all templates
$procache->getCacheClearBehaviors($options = []) apivar.method
Get the cache clearing behaviors for all templates or a given template
$forms->loadHooksFile() apivar.method
Load the optional /site/templates/form-builder.inc hooks file
$forms->setTemplateVersion(int $version) apivar.method
Set the form-builder.php template version, to be called from form-builder.php
$forms->getTemplateVersion() apivar.method
Get the template version set from form-builder.php
$fields->deleteFieldDataByTemplate(Field $field, Template $template) apivar.method
Physically delete all field data (from the database) used by pages of a given template
$fieldgroups->getNumTemplates(Fieldgroup $fieldgroup) apivar.method
Get the number of templates using the given fieldgroup.
$fieldgroups->getTemplates(Fieldgroup $fieldgroup) apivar.method
Given a Fieldgroup, return a TemplatesArray of all templates using the Fieldgroup
$templates->add(string $name, array $properties = []) apivar.method
Add and save new template (and fieldgroup) with given name and return it
$templates->get($key) apivar.method
Get a template by name or ID
$templates->save($item) apivar.method
Save a Template