diff --git a/architecture/developer-guide.md b/architecture/developer-guide.md index 47adc250..1116e27b 100644 --- a/architecture/developer-guide.md +++ b/architecture/developer-guide.md @@ -228,13 +228,13 @@ Element classes names should use hyphen-case (dashes) Partial views should begin with an underscore character. Whereas Controller and Layout views do not begin with an underscore character. Since views are often found in a single folder, the underscore (_) and dash (-) characters can be used to organise the files. A dash is used as a substitute for a space character. An underscore is used as a substitute for a slash character (folder or namespace). ``` -index_fancy-layout.htm <== Index\Fancy layout -form-with-sidebar.htm <== Form with sidebar -_field-container.htm <== Field container (partial) -_field_baloon-selector.htm <== Field\Baloon Selector (partial) +index_fancy-layout.php <== Index\Fancy layout +form-with-sidebar.php <== Form with sidebar +_field-container.php <== Field container (partial) +_field_baloon-selector.php <== Field\Baloon Selector (partial) ``` -View files must end with the `.htm` file extension. +View files must end with the `.php` file extension. ### Class naming @@ -540,7 +540,7 @@ folder/ | |-- sub2folder/ | | `-- sub3file # A comment about this file | `-- sub2folder2/ -|-- index.htm +|-- index.php `-- .hidden_file # This file is hidden and should be slightly transparent ``` @@ -557,7 +557,7 @@ folder/ | |-- sub2folder/ | | `-- sub3file # A comment about this file | `-- sub2folder2/ -|-- index.htm +|-- index.php `-- .hidden_file # This file is hidden and should be slightly transparent ``` @@ -577,7 +577,7 @@ This feature also supports the output of the `tree` command-line utility which i # folder/ # ├── .hidden_file -# ├── index.htm +# ├── index.php # ├── subfolder1/ # ├── subfolder2/ # │ ├── document.pdf @@ -601,7 +601,7 @@ folder/ │ └── sub2folder/ │ └── sub3file ├── .hidden_file -└── index.htm +└── index.php ``` > **NOTE:** The `tree` command may print out indented lines using a character that looks to be a space character, but is not. If this is the case, you may need to add the `--charset=ascii` option to the command, which will print a diagram similar to the first example. diff --git a/backend/controllers-ajax.md b/backend/controllers-ajax.md index 9e01395f..e10a1f94 100644 --- a/backend/controllers-ajax.md +++ b/backend/controllers-ajax.md @@ -4,7 +4,7 @@ The Winter CMS backend implements the MVC pattern. Controllers manage backend pages and implement various features like forms and lists. This article describes how to develop backend controllers and how to configure controller behaviors. -Each controller consists of a PHP file which resides in the the **/controllers** subdirectory of a Plugin directory. Controller views are `.htm` files that reside in the controller view directory. The controller view directory name matches the controller class name written in lowercase. The view directory can also contain controller configuration files. An example of a controller directory structure: +Each controller consists of a PHP file which resides in the the **/controllers** subdirectory of a Plugin directory. Controller views are `.php` files that reside in the controller view directory. The controller view directory name matches the controller class name written in lowercase. The view directory can also contain controller configuration files. An example of a controller directory structure: ```treeview plugins/ @@ -12,9 +12,9 @@ plugins/ `-- blog/ |-- controllers/ | |-- users/ # Controller view directory - | | |-- _partial.htm # Controller partial file + | | |-- _partial.php # Controller partial file | | |-- config_form.yaml # Controller config file - | | `-- index.htm # Controller view file + | | `-- index.php # Controller view file | `-- Users.php # Controller class `-- Plugin.php ``` @@ -57,7 +57,7 @@ Property | Description ## Actions, views and routing -Public controller methods, called **actions** are coupled to **view files** which represent the page corresponding the action. Backend view files use PHP syntax. Example of the **index.htm** view file contents, corresponding to the **index** action method: +Public controller methods, called **actions** are coupled to **view files** which represent the page corresponding the action. Backend view files use PHP syntax. Example of the **index.php** view file contents, corresponding to the **index** action method: ```html