Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksagona committed Nov 2, 2023
1 parent 189c501 commit 6762e47
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ pop-view
* [Overview](#overview)
* [Install](#install)
* [Quickstart](#quickstart)
* [Using a PHP-file template](#using-a-php-file-template)
* [Using a basic stream template](#using-a-basic-stream-template)
* [Includes with a stream template](#includes-with-a-stream-template)
* [Inheritance with a stream template](#inheritance-with-a-stream-template)
* [Iteration over an array with a stream template](#iteration-over-an-array-with-a-stream-template)
* [Conditional logic with a stream template](#conditional-logic-with-a-stream-template)
* [File Template](#file-template)
* [Stream Template](#stream-template)
- [Includes](#includes)
- [Inheritance](#inheritance)
- [Iteration](#iteration)
- [Conditionals](#conditionals)

Overview
--------
Expand Down Expand Up @@ -80,7 +80,8 @@ which will produce:

[Top](#pop-view)

### Using a PHP-file template
File Template
-------------

A file template simply uses PHP variables to deliver the data and content to template to be rendered.
With a file template, you have full access to the PHP environment to write any additional code or
Expand Down Expand Up @@ -117,7 +118,9 @@ echo $view;

[Top](#pop-view)

### Using a basic stream template

Stream Template
---------------

A stream template uses a formatted string placeholder to deliver the data and content to template to be rendered:

Expand Down Expand Up @@ -153,7 +156,9 @@ echo $view;

[Top](#pop-view)

### Includes with a stream template
### Includes

Stream templates support includes to allow you to include other templates within them.

##### header.html

Expand Down Expand Up @@ -206,7 +211,9 @@ echo $view;

[Top](#pop-view)

### Inheritance with a stream template
### Inheritance

Stream templates support inheritance to allow you to extend other templates.

##### parent.html

Expand Down Expand Up @@ -259,7 +266,9 @@ echo $view;

[Top](#pop-view)

### Iteration over an array with a stream template
### Iteration

Iteration is possible in stream templates when working with arrays and array-like objects.

```html
<!-- index.html //-->
Expand Down Expand Up @@ -301,7 +310,9 @@ echo $view;

[Top](#pop-view)

### Conditional logic with a stream template
### Conditionals

Conditional logic is possible within a stream template as well.

```html
<!-- index.html //-->
Expand Down

0 comments on commit 6762e47

Please sign in to comment.