feulf / raintpl3

The easiest Template Engine for PHP
https://feulf.github.io/raintpl
258 stars 57 forks source link

Input direct HTML as template #112

Closed CodeNegar closed 11 years ago

CodeNegar commented 11 years ago

Hi, Currently we have to say the template file name to draw a template. Can you add an option to input direct template string? e.g:

 $tpl->draw( '<div class="output">This is {$title}.</iv>');

I can do it myself, but I'm not sure if the license allows me to publish my project with the changes.

Thanks.

xPaw commented 11 years ago

drawString.

feulf commented 11 years ago

RainTPL is under MIT license, so you're free to do any change you want.

as xPaw said, you want to use drawString, here's the example: https://github.com/rainphp/raintpl3/blob/master/example-draw-string.php

CodeNegar commented 11 years ago

Wow, Thanks, really great project.