$templates


Template Properties

$template->name

Introduced in Version 2.0

Description

Get or set the template's name.

In this example, we get a template by its ID and output its name. We then set it a new name and output its new name.

// get the template with ID number 63
$t = $templates->get(63);
echo $t->name; // outputs skyscraper

// set a new name for this template
$t->name = "building";
$t->save();
echo $t->name; //outputs building

Related

Post Comment