$templates


Template Properties

$template->urlSegments

Introduced in Version 2.0

Description

Get or set whether pages using this template can make use of URL segments. Set to 1 for yes or 0 for no. Default is 0.

Check whether pages using this template can use URL segments.

$t = $templates->get("skyscraper");
if($t->urlSegments) {
    echo "<p>Pages using this template can use URL segments</p>";
} else {
    echo "<p>Pages using this template cannot use URL segments</p>";
}							

Enable use of URL segments for pages using this template.

$t = $templates->get("skyscraper");
$t->urlSegments = 1;
$t->save();

Related

Post Comment