diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000..76edfa6
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1 @@
+{"image":"mcr.microsoft.com/devcontainers/universal:2"}
\ No newline at end of file
diff --git a/_documentation/cmfive-tests/enable-tests.md b/_documentation/cmfive-tests/enable-tests.md
index 4af93b5..d8ec78f 100644
--- a/_documentation/cmfive-tests/enable-tests.md
+++ b/_documentation/cmfive-tests/enable-tests.md
@@ -15,13 +15,14 @@ Enabling the test framework is simple. Edit the file:
cmfive-boilerplate/config.php
```
Update the 'testrunner' setting to 'ENABLED'.
+
```php
//========== TestRunner Configuration ==========================
//========== must be "ENABLED" to run ==========================
//========== "config" will pass through to CmfiveSite helper ===
Config::append("tests", array(
- "testrunner" => "ENABLED" ,
- 'config' => [ ]
+ "testrunner" => "ENABLED",
+ 'config' => [ ]
));
```
The Cmfive test libraries do not need any extra entries to be added in the TestRunner 'config' array setting.
diff --git a/_documentation/core-modules/insight/insight.md b/_documentation/core-modules/insight/insight.md
index 1584fe1..9f9504e 100644
--- a/_documentation/core-modules/insight/insight.md
+++ b/_documentation/core-modules/insight/insight.md
@@ -13,9 +13,12 @@ The insight's class will be the sort of insight it is, followed by Insight (e.g.
```php
class ExampleInsight extends InsightBaseClass
+{
+
+}
```
-Below this, give the variables for the insight's name and description. These will appear in the insight list, the first page seen in CMFive when you click on the insight module.
+In this class, add the variables below for the insight's name and description. These will appear in the insight list, the first page seen in CMFive when you click on the insight module.
```php
public $name = "Example Insight";
@@ -26,72 +29,71 @@ These variables will indicate to users which insight is which.
All insights will contain a getFilters function and a run function. The getFilters function will be called when a user clicks on the View button next to the insight. The run function is called when the user clicks Run from the view screen.
getFilters will be an array, which sets up the parameters the user can choose. Before running an insight, the user may specify it to only show information from specific dates, for certain users, etc.
-Add the below code underneath your name and description variables.
+Add the function below to your ExampleInsight class.
```php
public function getFilters(Web $w, $parameters = []): array
{
+
+}
```
The filters you choose for the user to select from will depend on the insight you are creating.
-The below code shows the code that goes in your getFilters function. This example has filters for choosing the date to and from that the insight shows.
-
+The code shown below goes in your getFilters function. It is what generates the filter options the user may choose from. This example has filters for choosing the date to and from that the insight shows.
```php
- return [
- "Options" => [
- [
- [
- "Date From", "date", "dt_from", array_key_exists('dt_from', $parameters) ? $parameters['dt_from'] : null
- ],
- [
- "Date To", "date", "dt_to", array_key_exists('dt_to', $parameters) ? $parameters['dt_to'] : null
- ],
- ]
- ]
- ];
-}
+return [
+ "Options" => [
+ [
+ [
+ "Date From", "date", "dt_from", array_key_exists('dt_from', $parameters) ? $parameters['dt_from'] : null
+ ],
+ [
+ "Date To", "date", "dt_to", array_key_exists('dt_to', $parameters) ? $parameters['dt_to'] : null
+ ],
+ ]
+ ]
+];
```
You will notice that both filters contain an array_key_exists function. This is required on all filters in your insight. When you click the Change Insight Parameters button, the options you chose that session previously will be pre-filled for you.
The run function will also be an array. It will find data based on the selected filters and then organise it into the appropriate columns for each table in the insight.
-Place the below code under your getFilters function.
-
+Add the following function after your getFilters function.
```php
public function run(Web $w, $parameters = []): array
{
+
+}
```
-First, the insight finds the correct data based on the filters you have chosen. The data variable for our Example Insight will look like the code below.
+First, the insight finds the correct data based on the filters you have chosen. Add the following code to the run function to get the relevant data for our example insight.
```php
$data = ExampleService::getInstance($w)->getExamples(($parameters['dt_from']), ($parameters['dt_to']));
```
The getExamples function refers to a where array. In most cases you will not have to build one. Variables for all your data required for your insights tables can usually be created using existing service functions.
-After retrieving the data based on the selected filters, your run function must build its table(s). It will look something like this.
-
+After retrieving the data based on the selected filters, your run function must build its table(s). For our example, add the following code to the run function.
```php
if (!$data) {
- $results[] = new InsightReportInterface('Example Report', ['Results'], [['No data returned for selections']]);
- } else {
- // convert $data from list of objects to array of values
- $convertedData = [];
+ $results[] = new InsightReportInterface('Example Report', ['Results'], [['No data returned for selections']]);
+} else {
+ // convert $data from list of objects to array of values
+ $convertedData = [];
- foreach ($data as $datarow) {
- $row = [];
- $row['module'] = $datarow->module;
- $row['url'] = $datarow->path;
- $row['class'] = $datarow->db_class;
- $row['action'] = $datarow->db_action;
- $row['db_id'] = $datarow->db_id;
- $convertedData[] = $row;
- }
- $results[] = new InsightReportInterface('Example Report', ['Module', 'URL', 'Class', 'Action', 'DB Id'], $convertedData);
- }
- return $results;
+ foreach ($data as $datarow) {
+ $row = [];
+ $row['module'] = $datarow->module;
+ $row['url'] = $datarow->path;
+ $row['class'] = $datarow->db_class;
+ $row['action'] = $datarow->db_action;
+ $row['db_id'] = $datarow->db_id;
+ $convertedData[] = $row;
}
+ $results[] = new InsightReportInterface('Example Report', ['Module', 'URL', 'Class', 'Action', 'DB Id'], $convertedData);
}
+
+return $results;
```
The first few rows indicate what the insight will display if no data comes back.
diff --git a/_documentation/core-modules/report/report.md b/_documentation/core-modules/report/report.md
index 84fd060..cd6792c 100644
--- a/_documentation/core-modules/report/report.md
+++ b/_documentation/core-modules/report/report.md
@@ -8,18 +8,20 @@ type: doc
The report module allows users to write custom MYSQL reports that can be saved and run when needed.
+[comment]: # (The code snippet is indented so it can render the tabs correctly within the numbered list)
+
## Setup
1. Before you learn how to use reports you'll need to make sure your config is setup correctly. Add the following entries into the config.php file in the root directory of your Cmfive project.
-```php
-Config::set("report.database", [
- "hostname" => "DB_HOSTNAME",
- "username" => "DB_USERNAME",
- "password" => "DB_PASSWORD",
- "database" => "DB_NAME",
- "driver" => "mysql"
-]);
-```
+ ```php
+ Config::set("report.database", [
+ "hostname" => "DB_HOSTNAME",
+ "username" => "DB_USERNAME",
+ "password" => "DB_PASSWORD",
+ "database" => "DB_NAME",
+ "driver" => "mysql"
+ ]);
+ ```
2. Replace DB_HOSTNAME, DB_USERNAME, DB_PASSWORD and DB_NAME with their respective values.
3. To clear your config cache to apply your changes.
diff --git a/_tutorials/additional-configuration/emails.md b/_tutorials/additional-configuration/emails.md
index 500d0a1..9f0be2d 100644
--- a/_tutorials/additional-configuration/emails.md
+++ b/_tutorials/additional-configuration/emails.md
@@ -11,43 +11,52 @@ Cmfive supports two different types of email transports to best suit your needs.
- The AWS Transport uses various AWS services to make sending email faster and more reliable. Note, to enable the AWS Transport uploads must also stored in S3. See the uploads [tutorial](/tutorials/additional-configuration/uploads) for setup.
- The SwiftMailer transport uses the SwiftMailer library.
-## AWS Transport
+[comment]: # (The code snippets are indented so they work with the rendering of the numbered list of steps)
+## AWS Transport
1. Add the following entries into the config.php file in the root directory of your Cmfive project.
-```php
-Config::append("email", [
- "layer" => "aws",
-]);
-Config::set("admin.mail.aws", [
- "queue_url" => "SQS_QUEUE_URL",
- "region" => "SQS_QUEUE_REGION",
-]);
-```
+ ```php
+ Config::append("email", [
+ "layer" => "aws",
+ ]);
+
+ Config::set("admin.mail.aws", [
+ "queue_url" => "SQS_QUEUE_URL",
+ "region" => "SQS_QUEUE_REGION",
+ ]);
+ ```
+
2. If you're developing on Cmfive locally, also add the following. Note, when system.environment is set to production [AWS IAM Roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) must be used to authenticate with AWS as this is best practice for security.
-```php
-Config::set("admin.mail.aws.credentials", [
- "key" => "IAM_KEY",
- "secret" => "IAM_SECRET",
-]);
-Config::set("system.environment", "development");
-```
+ ```php
+ Config::set("admin.mail.aws.credentials", [
+ "key" => "IAM_KEY",
+ "secret" => "IAM_SECRET",
+ ]);
+
+ Config::set("system.environment", "development");
+ ```
+
3. Replace SQS_QUEUE_URL and SQS_QUEUE_REGION with their respective values as well as IAM_KEY and IAM_SECRET if system.environment is set to development.
+
4. Make sure to clear your config cache to apply your changes.
+
5. Clone the Cmfive-Mail-Service-CDK [repository](https://github.com/2pisoftware/Cmfive-Mail-Service-CDK) and follow the steps outlined in the README.md file to deploy the CDK stack.
## SwiftMailer Transport
1. Add the following entries into the config.php file in the root directory of your Cmfive project.
-```php
-Config::append("email", [
- "layer" => "smtp",
- "command" => "",
- "host" => "EMAIL_HOST",
- "port" => PORT_NUMBER,
- "auth" => true,
- "username" => "EMAIL_USERNAME",
- "password" => "EMAIL_PASSWORD",
-]);
-```
+ ```php
+ Config::append("email", [
+ "layer" => "smtp",
+ "command" => "",
+ "host" => "EMAIL_HOST",
+ "port" => PORT_NUMBER,
+ "auth" => true,
+ "username" => "EMAIL_USERNAME",
+ "password" => "EMAIL_PASSWORD",
+ ]);
+ ```
+
2. Replace EMAIL_HOST, PORT_NUMBER, EMAIL_USERNAME and EMAIL_PASSWORD with their respective values.
+
3. Make sure to clear your config cache to apply your changes.
\ No newline at end of file
diff --git a/_tutorials/additional-configuration/logs.md b/_tutorials/additional-configuration/logs.md
index b6a677c..29fa978 100644
--- a/_tutorials/additional-configuration/logs.md
+++ b/_tutorials/additional-configuration/logs.md
@@ -11,11 +11,13 @@ Cmfive supports two different types of log targets to best suit your needs.
- The AWS Target provides a more reliable solution with the option to specify a retention period (in days).
- The File Target is enabled by default and requires no further setup.
+[comment]: # (The code snippets are indented so they work with the rendering of the numbered list of steps)
+
## AWS Target
1. Add the following entries into the config.php file in the root directory of your Cmfive project.
-```php
-Config::set("admin.logging", [
+ ```php
+ Config::set("admin.logging", [
"target" => "aws",
"retention_period" => RETENTION_PERIOD,
"cloudwatch" => [
@@ -24,15 +26,19 @@ Config::set("admin.logging", [
"region" => "CLOUDWATCH_REGION",
"version" => "latest",
]
-]);
-```
+ ]);
+ ```
+
2. If you're developing on Cmfive locally, also add the following. Note, when system.environment is set to production [AWS IAM Roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) must be used to authenticate with AWS as this is best practice for security.
-```php
-Config::set("admin.logging.cloudwatch.credentials", [
- "key" => "IAM_KEY",
- "secret" => "IAM_SECRET",
-]);
-Config::set("system.environment", "development");
-```
+ ```php
+ Config::set("admin.logging.cloudwatch.credentials", [
+ "key" => "IAM_KEY",
+ "secret" => "IAM_SECRET",
+ ]);
+
+ Config::set("system.environment", "development");
+ ```
+
3. Replace RETENTION_PERIOD, GROUP_NAME, APP_NAME, CLOUDWATCH_REGION with their respective values as well as IAM_KEY and IAM_SECRET if system.environment is set to development.
+
4. Make sure to clear your config cache to apply your changes.
\ No newline at end of file
diff --git a/_tutorials/additional-configuration/uploads.md b/_tutorials/additional-configuration/uploads.md
index 31b60dd..3f3fafc 100644
--- a/_tutorials/additional-configuration/uploads.md
+++ b/_tutorials/additional-configuration/uploads.md
@@ -11,35 +11,43 @@ Cmfive supports two different types of file adapters for uploads to best suit yo
- The Local Adapter is enabled by default and requires no further setup.
- The S3 Adapter provides a more available and reliable solution.
+[comment]: # (The code snippets are indented so they work with the rendering of the numbered list of steps)
+
## S3 Adapter
1. Add the following entries into the config.php file in the root directory of your Cmfive project.
-```php
-Config::set("file.adapters.local.active", false);
-Config::set("file.adapters.s3", [
- "active" => true,
- "region" => "S3_BUCKET_REGION",
- "version" => "2006-03-01",
- "credentials" => [
- "key" => "IAM_KEY",
- "secret" => "IAM_SECRET",
- ],
- "bucket" => "S3_BUCKET_NAME",
- "options" => [
- "directory" => "uploads",
- "create" => true
- ],
-]);
-```
+ ```php
+ Config::set("file.adapters.local.active", false);
+
+ Config::set("file.adapters.s3", [
+ "active" => true,
+ "region" => "S3_BUCKET_REGION",
+ "version" => "2006-03-01",
+ "credentials" => [
+ "key" => "IAM_KEY",
+ "secret" => "IAM_SECRET",
+ ],
+ "bucket" => "S3_BUCKET_NAME",
+ "options" => [
+ "directory" => "uploads",
+ "create" => true
+ ],
+ ]);
+ ```
+
2. If you're developing on Cmfive locally, also add the following. Note, when system.environment is set to production [AWS IAM Roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) must be used to authenticate with AWS as this is best practice for security.
-```php
-Config::set("file.adapters.s3.credentials", [
- "key" => "IAM_KEY",
- "secret" => "IAM_SECRET",
-]);
-Config::set("system.environment", "development");
-```
+ ```php
+ Config::set("file.adapters.s3.credentials", [
+ "key" => "IAM_KEY",
+ "secret" => "IAM_SECRET",
+ ]);
+
+ Config::set("system.environment", "development");
+ ```
+
3. Replace S3_BUCKET_REGION, IAM_KEY, IAM_SECRET and S3_BUCKET_NAME with their respective values as well as IAM_KEY and IAM_SECRET if system.environment is set to development.
+
4. Make sure to clear your config cache to apply your changes.
+
5. If you have any files stored locally from prior to using the S3 Adapter you can run file transfer tool in the admin module from within Cmfive to move them to S3.

\ No newline at end of file
diff --git a/_tutorials/installation/installation.md b/_tutorials/installation/installation.md
index 793fa6e..94cf1f1 100644
--- a/_tutorials/installation/installation.md
+++ b/_tutorials/installation/installation.md
@@ -25,8 +25,10 @@ Install the Docker extension by Microsoft (extension ID: ```ms-azuretools.vscode
#### Step 3 - Building the containers
Right-click on the ```docker-compose.yml``` file and select ```Compose Up``` (This will take a while)
+[comment]: # (Docker Tab image has an extra line of whitespace before it, otherwise it renders inline with the text)
#### Step 4 - Verify
-When docker compose has finished, check that you have 3 containers ready by clicking on the Docker tab on the left
+When docker compose has finished, check that you have 3 containers ready by clicking on the Docker tab on the left.
+

#### Step 5 - Connect to database container
diff --git a/_tutorials/module-anatomy/actions.md b/_tutorials/module-anatomy/actions.md
index 53ad1f3..d923d32 100644
--- a/_tutorials/module-anatomy/actions.md
+++ b/_tutorials/module-anatomy/actions.md
@@ -12,7 +12,8 @@ The following example is of an index action located in module_folder -> actions
```php
ctx("title", "Example Module");
-
}
```
The code above we use the 'ctx' or context function on our Web object to set the title for our index action. Our index action is now accessible through the Cmfive UI, click on the 'Example' menu item in Cmfive to view the index action.
@@ -48,10 +48,12 @@ Now create a new file in our 'item' submodule and call it 'edit.php'. In this fi
function edit_GET(Web $w)
{
+
}
function edit_POST(Web $w)
{
+
}
```
Let's continue by focussing on the GET method.
@@ -78,7 +80,6 @@ function edit_GET(Web $w)
// sending the form to the 'out' function bypasses the template.
$w->out(Html::multiColForm($formData, 'example-item/edit'));
-
}
```
Now that we have the form, let's add to the POST function where we will save the data to the database.
diff --git a/_tutorials/module-anatomy/add-item-table.md b/_tutorials/module-anatomy/add-item-table.md
index b7009a8..2132406 100644
--- a/_tutorials/module-anatomy/add-item-table.md
+++ b/_tutorials/module-anatomy/add-item-table.md
@@ -7,12 +7,12 @@ type: tute
## Adding The Item Table to The Index Template
-Adding the item table to the index template.
-
-Open templates/index.tpl.php and add the following lines.
+Open templates/index.tpl.php and add the line `echo $itemTable;`. Your templates/index.tpl.php file should now look like this:
```php
-
-
+
-Now we need to get our item action buttons to work properly. We will do this in the Edit Item Button section.
\ No newline at end of file
+Now we need to get our item action buttons to work properly. We will do this in the Edit Item Button section.
diff --git a/_tutorials/module-anatomy/config.md b/_tutorials/module-anatomy/config.md
index 1cbea45..92aab44 100644
--- a/_tutorials/module-anatomy/config.md
+++ b/_tutorials/module-anatomy/config.md
@@ -8,6 +8,7 @@ type: tute
```php
true,
'path' => 'modules',
@@ -29,6 +30,7 @@ In the example module folder, create a file called config.php and insert the fol
```php
true,
'path' => 'modules',
diff --git a/_tutorials/module-anatomy/creating-a-config.md b/_tutorials/module-anatomy/creating-a-config.md
index 70f27c5..60a7d60 100644
--- a/_tutorials/module-anatomy/creating-a-config.md
+++ b/_tutorials/module-anatomy/creating-a-config.md
@@ -8,6 +8,7 @@ type: tute
```php
true,
'path' => 'modules',
@@ -27,6 +28,7 @@ In the example module folder, create a file called config.php and insert the fol
```php
true,
'path' => 'modules',
@@ -40,4 +42,4 @@ Now clear the config cache and refresh the browser window. You should now see a
Now that our module has a config we need to add some tables to the database.
-If an error occurs follow the instructions in [The Models Folder] (theModelsFolder) and see if this rectifies the issue.
\ No newline at end of file
+If an error occurs follow the instructions in [The Models Folder] (theModelsFolder) and see if this rectifies the issue.
diff --git a/_tutorials/module-anatomy/creating-index-action.md b/_tutorials/module-anatomy/creating-index-action.md
index c81090a..514b4b3 100644
--- a/_tutorials/module-anatomy/creating-index-action.md
+++ b/_tutorials/module-anatomy/creating-index-action.md
@@ -14,6 +14,7 @@ The following example is of an index action located in module_folder -> actions
function index_ALL(Web $w)
{
+
}
```
The function name before the underscore must match the file name. This is followed by the method, GET, POST or ALL. Finally, all actions need to be passed the Web $w object.
diff --git a/_tutorials/module-anatomy/creating-index-template.md b/_tutorials/module-anatomy/creating-index-template.md
index de504ec..b4ec2da 100644
--- a/_tutorials/module-anatomy/creating-index-template.md
+++ b/_tutorials/module-anatomy/creating-index-template.md
@@ -12,9 +12,11 @@ Let's create a template for our example module's index action. Create a folder c
To add a button to the example index page we are going to use Cmfive's html class. This can be found in 'system/html.php'. We will be using the 'b' function that returns a html button.
Add this code to the 'index.tpl.php'.
-```html
-
+```php
+
@@ -46,7 +48,7 @@ function edit_GET(Web $w)
$w->out(Html::multiColForm($formData, 'edit'));
}
```
-Note that we render the form without the template in the above 'out' function. This is because the form is the only thing displayed on the page. It is only a single HTML element which is to be rendered. When more than one HTML element is to be rendered we use the template, as seen i the last code block on this page.
+Note that we render the form without the template in the above 'out' function. This is because the form is the only thing displayed on the page. It is only a single HTML element which is to be rendered. When more than one HTML element is to be rendered we use the template, as seen in the last code block on this page.
Now that we have the form, let's add to the POST function where we will save the data to the database.
```php
@@ -104,4 +106,4 @@ function index_ALL(Web $w)
```
Here we use the 'ctx' function to send our table to the template. This is because the index page will display the item table, and the button to add a new item. When rendering two or more HTML elements, the template is useful as it gives us greater control.
-To view the table we need to add it to the index action template file.
\ No newline at end of file
+To view the table we need to add it to the index action template file.
diff --git a/_tutorials/module-anatomy/install-and-migrations.md b/_tutorials/module-anatomy/install-and-migrations.md
index a99a716..cdf108e 100644
--- a/_tutorials/module-anatomy/install-and-migrations.md
+++ b/_tutorials/module-anatomy/install-and-migrations.md
@@ -48,13 +48,12 @@ Let's use the migration to add a database table for our module by editing the up
```php
public function up()
{
- // UP
- $column = parent::Column();
- $column->setName('id')
- ->setType('biginteger')
- ->setIdentity(true);
-
- }
+ // UP
+ $column = parent::Column();
+ $column->setName('id')
+ ->setType('biginteger')
+ ->setIdentity(true);
+}
```
The function already contains some code. This is the definition for the id column that each table will need. Let's now define a table for an example item that we want to store data against.
```php
@@ -63,20 +62,20 @@ public function up()
// UP
$column = parent::Column();
$column->setName('id')
- ->setType('biginteger')
- ->setIdentity(true);
+ ->setType('biginteger')
+ ->setIdentity(true);
if (!$this->hasTable("example_item")) { //it can be helpful to check that the table name is not used
$this->table("example_item", [ // table names should be appended with 'ModuleName_'
- "id" => false,
- "primary_key" => "id"
- ])->addColumn($column) // add the id column
- ->addStringColumn('name')
- ->addBooleanColumn('is_checked') //boolean columns need to be appended with 'is_'
- ->addDateTimeColumn('dt_started') // Datetime columns need to be appended with 'dt_'
- ->addIntegerColumn('my_integer')
- ->addCmfiveParameters() // this function adds some standard columns used in cmfive. dt_created, dt_modified, creator_id, modifier_id, and is_deleted.
- ->create();
+ "id" => false,
+ "primary_key" => "id"
+ ])->addColumn($column) // add the id column
+ ->addStringColumn('name')
+ ->addBooleanColumn('is_checked') //boolean columns need to be appended with 'is_'
+ ->addDateTimeColumn('dt_started') // Datetime columns need to be appended with 'dt_'
+ ->addIntegerColumn('my_integer')
+ ->addCmfiveParameters() // this function adds some standard columns used in cmfive. dt_created, dt_modified, creator_id, modifier_id, and is_deleted.
+ ->create();
}
}
```
@@ -94,4 +93,4 @@ In the browser, navigate to the Cmfive migrations page, view by individual modul
After running the migration we can verify that the table was created in the database.
To roll back we can click 'rollback to here' next to our migration. This will run the down function and the table will be removed.
-Make sure the migration is run and we can now look at creating our item model and our module service class.
\ No newline at end of file
+Make sure the migration is run and we can now look at creating our item model and our module service class.
diff --git a/_tutorials/module-anatomy/install.md b/_tutorials/module-anatomy/install.md
index e15c26f..890d754 100644
--- a/_tutorials/module-anatomy/install.md
+++ b/_tutorials/module-anatomy/install.md
@@ -52,13 +52,12 @@ Let's use the migration to add a database table for our module by editing the up
```php
public function up()
{
- // UP
- $column = parent::Column();
- $column->setName('id')
- ->setType('biginteger')
- ->setIdentity(true);
-
- }
+ // UP
+ $column = parent::Column();
+ $column->setName('id')
+ ->setType('biginteger')
+ ->setIdentity(true);
+}
```
The function already contains some code. This is the definition for the id column that each table will need. Let's now define a table for an example item that we want to store data against.
```php
diff --git a/_tutorials/module-anatomy/models.md b/_tutorials/module-anatomy/models.md
index ccc5b5e..04d8254 100644
--- a/_tutorials/module-anatomy/models.md
+++ b/_tutorials/module-anatomy/models.md
@@ -22,6 +22,7 @@ Open the file and add the class definition.
class ExampleService extends DbService
{
+
}
```
Let's add two functions to our service class that will be used to retrieve data for our example items. These functions will use GetObject functions from Cmfive's DbService class. Add these functions to the service class.
diff --git a/_tutorials/module-anatomy/templates.md b/_tutorials/module-anatomy/templates.md
index 3dcdd80..75ddb40 100644
--- a/_tutorials/module-anatomy/templates.md
+++ b/_tutorials/module-anatomy/templates.md
@@ -23,10 +23,12 @@ Now refresh the example index page to view the button. Notice that the URL uses
Adding the item table to the index template.
-Open templates/index.tpl.php and add the following lines.
+Open templates/index.tpl.php and modify it so it looks like this:
```php
-
-
+
Now we need to get our item action buttons to work properly. We will do this back in the actions section. Resume the actions tutorial [here](actions#tutorial-part-3)
\ No newline at end of file
diff --git a/_tutorials/module-anatomy/theModelsFolder.md b/_tutorials/module-anatomy/theModelsFolder.md
index e948340..2c3c562 100644
--- a/_tutorials/module-anatomy/theModelsFolder.md
+++ b/_tutorials/module-anatomy/theModelsFolder.md
@@ -18,19 +18,22 @@ Open the file and add the class definition.
```php
GetObjects('ExampleItem',['is_deleted'=>0]);
}
// returns a single example item matching the given id
-public function GetItemForId($id) {
+public function GetItemForId($id)
+{
return $this->GetObject('ExampleItem',$id);
}
```
@@ -41,13 +44,12 @@ Let's start defining our model properties in our 'ExampleItem.php' file.
```php