mirror of
https://github.com/processwire/processwire.git
synced 2025-08-07 07:16:51 +02:00
Update site-blank profile to have a /site/classes/ placeholder directory along with HomePage.php file as example/placeholder to ensure directory exists.
This commit is contained in:
20
site-blank/classes/HomePage.php
Normal file
20
site-blank/classes/HomePage.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php namespace ProcessWire;
|
||||
|
||||
/**
|
||||
* Example custom page class for pages using template “home”
|
||||
*
|
||||
* Feel free to delete this file if you do not want it. This is here as a
|
||||
* placeholder to ensure the /site/classes/ directory exists.
|
||||
*
|
||||
* When this file/class is present, page using template “home” will use this
|
||||
* class “HomePage” rather than class “Page”. You can do the same for any
|
||||
* other templates. For example, template “basic-page” would have a class
|
||||
* named “BasicPagePage” and template “admin” would have “AdminPage”, etc.
|
||||
*
|
||||
* Custom page classes must extend class “Page”, or one derived from it.
|
||||
*
|
||||
* @property string $title
|
||||
*
|
||||
*/
|
||||
class HomePage extends Page {
|
||||
}
|
@@ -17,7 +17,7 @@
|
||||
* This file is licensed under the MIT license
|
||||
* https://processwire.com/about/license/mit/
|
||||
*
|
||||
* ProcessWire 3.x, Copyright 2021 by Ryan Cramer
|
||||
* ProcessWire 3.x, Copyright 2022 by Ryan Cramer
|
||||
* https://processwire.com
|
||||
*
|
||||
*/
|
||||
@@ -31,6 +31,9 @@ if(!defined("PROCESSWIRE")) die();
|
||||
// Let core API vars also be functions? So you can use $page or page(), for example.
|
||||
$config->useFunctionsAPI = true;
|
||||
|
||||
// Use custom Page classes in /site/classes/ ? (i.e. template "home" => HomePage.php)
|
||||
$config->usePageClasses = true;
|
||||
|
||||
// Use Markup Regions? (https://processwire.com/docs/front-end/output/markup-regions/)
|
||||
$config->useMarkupRegions = true;
|
||||
|
||||
|
Reference in New Issue
Block a user