Skip to content

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:

  1. Download PHXView zip and unpack.
  2. Copy PHXView.php to your application/libraries folder.
  3. Create the following folders: application/components, application/layouts, application/views/components, application/views/layouts
  4. 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]

Clone this wiki locally