Manages and provides access to all the Templates.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Templates class also inherits all the methods and properties of: WireSaveableItems and Wire.

Common / Advanced


Name Return Summary  
$templates->clone($item) bool, Saveable or Template Clone the given Template
$templates->delete($item) bool Delete a Template
$templates->get($key) Template or null Get a template by name or ID
$templates->getNumPages(Template $tpl) int Return the number of pages using the provided Template
$templates->getParentPage(Template $template) Page, NullPage, null or PageArray Return the parent page that this template assumes new pages are added to
$templates->getParentPages(Template $template) PageArray Return all possible parent pages for the given template, if predefined
$templates->save($item) bool Save a Template


Name Return Summary  
$templates->getExportData(Template $template) array Export Template data for external use
$templates->setImportData(Template $template, array $data) bool Given an array of Template export data, import it to the given Template

Additional methods and properties

In addition to the methods and properties above, Templates also inherits the methods and properties of these classes: