Closed kargnas closed 11 years ago
I was confused too when i was starting using RainTPL but solved it within a wrapper (https://github.com/webnull/panthera/blob/master/lib/templates.class.php#L543) Thats why i want absolute paths support in RainTPL and created a pull request.
This feature unfortunately increases IO usage by looking for a template in additional directories.
Someone already implemented the multi directory loading, if not yet in master I'll search in which branch it is and merge into master. Thanks
On Mon, Aug 5, 2013 at 5:43 PM, Damian Kęska notifications@github.comwrote:
I was confused too when i was starting using RainTPL but solved it within a wrapper ( https://github.com/webnull/panthera/blob/master/lib/templates.class.php#L543 ) Thats why i want absolute paths support in RainTPL and created a pull request.
This feature unfortunately increases IO usage by looking for a template in additional directories.
— Reply to this email directly or view it on GitHubhttps://github.com/rainphp/raintpl3/issues/103#issuecomment-22114808 .
@webnull Is that wrapping solution only apply to draw in phpClass drawing?
https://github.com/kargnas/raintpl3/commit/36fc71424deb6cc9d7154f82aca45c8e6424c011
@webnull @rainphp What about this? Please review this code, i will pull request. No need to make absolute path.
I think you can pull. The code looks fine, but variable names sometimes have weird names :smile:
I dont understand what you mean by draw in phpClass drawing. I have a wrapper "pantheraTemplate" and I use it as $panthera->template->push('var', 'value'); $panthera -> template -> display('test.tpl'); and it can use Smarty or RainTPLv3 or any diffirent template engines without need to change anything in application code. And yes, it's fast. Whole framework in admin panel loads in ~0.01s (~110 requests per seconds on 6 years old Intel CoreDuo @ 1.6GHz) with db, sql, caching, template engine, user & groups, metas, configuration, and locales. Everything is done by wrappers etc. i think it must be enough fast solution.
@webnull Thank you, I will pull request with some example. It seems to explain through code.
What about this feature to the philosophy of Rain? In smarty, I did use this feature for mobile. (But there are some bugs.)