$templates


Template Properties

$template->allowPageNum

Introduced in Version 2.0

Description

Get or set whether pages using this template can have URL-based page numbers. Set to 1 for yes or 0 for no. Default is 0.

Check whether pages using this template can have URL-based page numbers.

$t = $templates->get("skyscraper");
if($t->allowPageNum) {
    echo "<p>Pages using this template can have URL-based page numbers</p>";
} else {
    echo "<p>Pages using this template cannot have URL-based page numbers</p>";
}

Enable URL-based page numbers for pages using this template.

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

Related

Post Comment