|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
conors Smarty n00b
Joined: 27 Oct 2017 Posts: 1
|
Posted: Fri Oct 27, 2017 1:45 pm Post subject: convert tpl to php |
|
|
Hi all,
Are there any tools available for converting smarty tpl files to regular php?
I've been looking around but can only seem to find things that convert php to tpl, not vice versa.
Thanks |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Fri Oct 27, 2017 4:16 pm Post subject: |
|
|
I am not aware of any tools.
You can rename template files to whatever you want. For example, foobarbaz.tpl to foobarbaz.php. Then, you will need to change the parameter in the Smarty call that displays or fetches the template.
The latest version of Smarty does not execute any PHP code that may be found in the template.
Once the template is compiled, you will find that this intermediate format is real PHP, but very likely in a format you will not be able to use. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Oct 27, 2017 6:46 pm Post subject: Re: convert tpl to php |
|
|
conors wrote: | Are there any tools available for converting smarty tpl files to regular php?
I've been looking around but can only seem to find things that convert php to tpl, not vice versa. |
Why there should be one? What are you going to do with it? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|