A super simple Lithium plugin to further simplify rendering partial templates in views.
- Clone/Download the plugin into your app's
Tell your app to load the plugin by adding the following to your app's
Create your partial template(s):
You can name he template anything you like, just make sure you append it with
_partial. For example,
By default, the helper will search for the template in your relevant view directory. For example, if it's being called from the
bar/addview, it will expect the partial template to exist in
If a matching template was not found in the view directory, the helper will then attempt to load it from the
elementsdirectory. This is particulary handy if this template is to be available for all views to use.
Tell your view to render the partial template using the
partialhelper using the following:
$variablesis an array that represents variable name/value pairs that are to be made available to the partial template (e.g. created using
As usual, please feel free to fork the project, add your feature or fix a bug and submit a Pull request.