SkinnyMVC is a light-weight, easy to learn, "skinny" development framework for PHP that enables the developer to implement the MVC architectural pattern, while maintaining maximum flexibility and performance of the application.
Add-on for SkinnyMVC
skPartial adds support for "partials" to SkinnyMVC.
"Partials" are reusable chucks of template code. However, where template code goes into a "templates/" directory, "partials" code goes into a "partials/" directory. (You may need to create these "partials/" directories yourself if they do not exist already.)
skPartial is a single file plugin for SkinnyMVC. Simply place the "skinnyPluginSkPartial.php" in the "plugins/" directory.
To use skPartial, use code like the following in your template files...
<?php skPartial::import('contact/form') ?>
Note that this partial would correspond to the file: "modules/contact/partials/form.php". You will have to create the "partials/" sub-directory, if it was not already created. And you will need to create the "form.php" file.
Developers can also pass parameters to the partial too, with code like the follwing...
<?php skPartial::import( 'contact/form' , array( 'msg'=>'Hello there!', 'mode'=>'pro') ) ?>
Whatever is in the 2nd parameter will be made available to the partial as the variable $partialData.