-
Notifications
You must be signed in to change notification settings - Fork 7.6k
PHXView View Engine
World Wide Web Server edited this page Jul 4, 2012
·
19 revisions
Category:Libraries Category:Libraries::TEMPLATE_ENGINES
This is a View engine that wraps the built in CI engine and allows the use of components and layouts. Components can be used to create pieces of the site that are common to many areas of your site/application. Layouts allow you to define a single file as a shell for your site to work inside of.
Installation:
- Download PHXView zip and unpack.
- Copy PHXView.php to your application/libraries folder.
- Create the following folders: application/components, application/layouts, application/views/components, application/views/layouts
- Add PHXView to your autoloads.
Usage:
Simple Usage: Create a layout file:
File name: application/views/layouts/default.php [code] <html> <head></head> <body>
<?=$view ?>
</body> </html> [/code]
Create a view file:
File name: application/views/testphxview.php [code] Hi, I'm the rendered view file. [/code]