Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhildred/slimphpviews
a Slim/View descendent with shared layouts that uses modern php for templating
https://github.com/rhildred/slimphpviews
Last synced: 12 days ago
JSON representation
a Slim/View descendent with shared layouts that uses modern php for templating
- Host: GitHub
- URL: https://github.com/rhildred/slimphpviews
- Owner: rhildred
- Created: 2015-06-07T20:54:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-21T03:11:44.000Z (over 9 years ago)
- Last Synced: 2024-08-17T07:14:17.326Z (5 months ago)
- Language: PHP
- Homepage: https://rhildred.github.io/PROG8020.html#phpviews
- Size: 387 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slimphpviews
a Slim/View descendent with shared layouts that uses modern php for templatingComposer.json
---
```
"require": {
"slim/slim": "2.*",
"rhildred/slimphpviews": "dev-master"
},
```
Example `public/index.php`
----
```
new \PHPView\PHPView(),
'templates.path' => __DIR__ . "/../views"));
$app->get('/', $index = function () use($app) {
$app->render("index.phtml", array("page" => "index"));
});
$app->run();
```
`views/index.phtml`
----
```
layout("_layout.phtml") ?>
Bootstrap starter template
Use this document as a way to quickly start any new project.
All you get is this text and a mostly barebones HTML document.
```
`views/_layout.phtml`
------
```Rich On Sourceforge
renderBody();
?>```