Page 1 of 1

TPL file

Posted: Tue Oct 14, 2014 7:24 pm
by hallsofvallhalla
I get to be a noob and ask what is a tpl file? Is this a smarty template file or something? It has php in it.

Re: TPL file

Posted: Tue Oct 14, 2014 7:38 pm
by vitinho444
I don't know myself, but I think I found it: http://stackoverflow.com/questions/1808 ... web-design

Re: TPL file

Posted: Tue Oct 14, 2014 8:02 pm
by Sim
tpl is short for template. It doesn't need to be for smarty. smarty accepts any file extension. .htm .html .tpl and prob some made up ones.

TPL use be used for php2.0 if I remember correctly.

Re: TPL file

Posted: Tue Oct 14, 2014 8:30 pm
by vitinho444
We are always learning :)
Thanks

Re: TPL file

Posted: Wed Oct 15, 2014 8:49 pm
by hallsofvallhalla
Thanks!

Re: TPL file

Posted: Thu Oct 16, 2014 2:46 am
by Sim
I personally prefer to use .htm or .html extensions with templating engines that allow it. If I use .tpl, I can't seem to open them in my browser if I need to look at it. =)

Re: TPL file

Posted: Fri Oct 17, 2014 10:29 pm
by Jackolantern
Sim wrote:I personally prefer to use .htm or .html extensions with templating engines that allow it. If I use .tpl, I can't seem to open them in my browser if I need to look at it. =)
Yes, I don't think you can open a template file directly in the browser since they require server-side processing. It is like trying to open a PHP file in the browser ;)

Re: TPL file

Posted: Fri Oct 17, 2014 11:01 pm
by Epiales
Jackolantern wrote:
Sim wrote:I personally prefer to use .htm or .html extensions with templating engines that allow it. If I use .tpl, I can't seem to open them in my browser if I need to look at it. =)
Yes, I don't think you can open a template file directly in the browser since they require server-side processing. It is like trying to open a PHP file in the browser ;)
Yeah, you have to edit with a word processor to edit them.

Re: TPL file

Posted: Fri Oct 17, 2014 11:17 pm
by Jackolantern
Yes, but I meant that a browser cannot directly open a Smarty template or really any other template for that matter (EJS, HAML, Jade, Razor, etc.). It requires server-side processing before it can be rendered in the browser.

Re: TPL file

Posted: Sat Oct 18, 2014 12:21 am
by Sim
Jackolantern wrote:Yes, but I meant that a browser cannot directly open a Smarty template or really any other template for that matter (EJS, HAML, Jade, Razor, etc.). It requires server-side processing before it can be rendered in the browser.

I know you can "open" smarty templating files in the browser. It just has the smarty syntax showing. I name my smarty template files with .htm or .html extensions so I can open them easier in the browser to view what the "output" is going to look like.