$templates


Template Methods

$template->hasField(string|int|Field)

Introduced in Version 2.0

Description

Does this template have the given field?

$t = $templates->get("skyscraper");
if($t->hasField("height")) {
    echo "<p>This template has the specified field</p>";
} else {
    echo "<p>This template does not have the specified field</p>";
}

Related

Post Comment