Template Methods


Introduced in Version 2.0


Save this template to the database.

In this example we create and save a new template. Each template has an associated fieldgroup so we must also create this.

//create a new field group for the new template we are creating
$fg = new Fieldgroup();
$fg->name = "skyscraper";

//add some fields to the fieldgroup

$t = new Template();
$t->name = "skyscraper";
$t->fieldgroup = $fg; //associate the template with its fieldgroup


Post Comment