$templates


Methods

$templates->get("name")

Introduced in Version 2.0

Description

Return the template with the given name

Examples

Get the template with the name skyscraper. Then add 3 fields (body, summary and images) to it and save.

$skyscraper = $templates->get("skyscraper");
$skyscraper->fields->add("body"); // add some fields
$skyscraper->fields->add("summary"); 
$skyscraper->fields->add("images");
$skyscraper->fields->save();
																																																															

Post Comment