philsturgeon / codeigniter-helpfulparser
- Source
- Commits
- Network (2)
- Issues (2)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
README.markdown | Thu Jun 18 05:40:25 -0700 2009 | |
| |
controllers/ | Thu Jun 18 05:14:23 -0700 2009 | |
| |
libraries/ | Thu Jun 18 05:16:06 -0700 2009 | |
| |
views/ | Thu Jun 18 05:14:23 -0700 2009 |
README.markdown
CodeIgniter-HelpfulParser
I have knocked up a modification to the CodeIgniter Template Parser, which I am calling "Helpful Parser".
Helpful Parser allows you to use helper functions in your Parser view files using a special syntax like the examples below. It will also load any helpers you try to use to save you having to load them yourself within the controller.
Usage
Here are just a few examples of the sort of syntax you can use within your Parser view files. The same syntax can be used on almost any helper file that exists in your CodeIgniter install, even custom helpers or extended ones.
Link
{url:anchor[$url|$title|'class="somethnig"']}
Form
{form:form_open['parser_test']}
{form:form_input['title'|$title|'onclick="this.value=''"']}
{form:form_input['url'|$url|'onclick="this.value=''"']}
{form:form_submit[''|'Submit']}
{form:form_close}
Repeat string
{string:repeater["repeat this<br/>"|10]}
Native PHP functions
{strtoupper[$title]}
Extra
If you'd like to request changes, report bug fixes, or contact the developer of this library, email email@philsturgeon.co.uk
