$templates


Template Methods

$template->set($property, $value)

Introduced in Version 2.0

Description

Set the value of a template's property (same as $template->$property = $value).

Set the label property of the given template.

$t = $templates->get("skyscraper");
$t->set("label", "Buildings"); //same as $t->label = "Buildings"
$t->save();
									

Set the given template's pages' view and edit access.

$t = $templates->get("skyscraper");
$t->set("useRoles", 1); //same as $t->useRoles=1
$t->save();

Related

Post Comment