1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 01:04:16 +02:00

Add support for custom Page classes

This commit is contained in:
Ryan Cramer
2020-03-06 14:13:22 -05:00
parent 15793931f4
commit 273183ddfb
19 changed files with 254 additions and 91 deletions

View File

@@ -142,6 +142,25 @@ $config->useFunctionsAPI = false;
*/
$config->useMarkupRegions = false;
/**
* Use custom page classes? Specify boolean true to enable.
*
* When enabled, if a class with name "[TemplateName]Page" (in ProcessWire namespace) exists
* in /site/classes/[TemplateName]Page.php, and it extends ProcessWires Page class, then the
* Page will be created with that class rather than the default Page class. For instance,
* template “home” would look for a class named “HomePage” and template "blog-post" (or
* "blog_post") would look for a class named “BlogPostPage” (file: BlogPostPage.php).
*
* If you create a file named /site/classes/DefaultPage.php with a DefaultPage class within
* it (that extends Page), then it will be used for all pages that would otherwise use the
* `Page` class.
*
* @var bool|string
* @since 3.0.152
*
*/
$config->usePageClasses = false;
/**
* Disable all HTTPS requirements?
*