Skip to content

Commit

Permalink
Readme box type
Browse files Browse the repository at this point in the history
  • Loading branch information
joanmon committed Aug 21, 2015
1 parent 16f32ce commit 0cd1632
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Getting started
|_ simple-template.phtml
|_ script.php
```
```
```html
<!-- simple-template.phtml -->
<!DOCTYPE html>
<html>
Expand All @@ -35,7 +35,7 @@ Getting started
</body>
</html>
```
```
```php
<?php
// script.php
use jmon\TplEngine\View;
Expand All @@ -44,7 +44,7 @@ View::set('title', 'hello world!');
echo View::render('simple-template.phtml');
?>
```
```
```html
<!-- final rendering -->
<!DOCTYPE html>
<html>
Expand All @@ -63,7 +63,7 @@ echo View::render('simple-template.phtml');
|_ home/index.phtml
|_ script.php
```
```
```html
<!-- layout.phtml -->
<!DOCTYPE html>
<html>
Expand All @@ -76,12 +76,12 @@ echo View::render('simple-template.phtml');
</body>
</html>
```
```
```html
<!-- home/index.phtml -->
<?php \jmon\TplEngine\View::templateExtend('layout.phtml')?>
<h1><?= \jmon\TplEngine\View::get('title') ?></h1>
```
```
```php
<?php
// script.php
use jmon\TplEngine\View;
Expand All @@ -90,7 +90,7 @@ View::set('title', 'hello world!');
echo View::render('/home/index.phtml');
?>
```
```
```html
<!-- final rendering -->
<!DOCTYPE html>
<html>
Expand All @@ -109,7 +109,7 @@ echo View::render('/home/index.phtml');
|_ partial.phtml
|_ script.php
```
```
```html
<!-- template.phtml -->
<!DOCTYPE html>
<html>
Expand All @@ -122,11 +122,11 @@ echo View::render('/home/index.phtml');
</body>
</html>
```
```
```html
<!-- partial.phtml -->
<footer><?= \jmon\TplEngine\View::get('footer-text') ?></footer>
```
```
```php
<?php
// script.php
use jmon\TplEngine\View;
Expand All @@ -136,7 +136,7 @@ View::set('footer-text', 'Awesome footer!');
echo View::render('template.phtml');
?>
```
```
```html
<!-- final rendering -->
<!DOCTYPE html>
<html>
Expand Down

0 comments on commit 0cd1632

Please sign in to comment.