Welcome to WebmasterWorld Guest from 54.166.227.36

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP Templates

     
1:59 pm on Sep 30, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I'm looking for the PHP template file. Does it come automatically with PEAR? If so, what do I have to include in my PHP files to utilize it. If not does anyone have a link to download it. Thanks,
2:54 pm on Oct 22, 2008 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member



Not sure what you are looking for here. Did you find it? PEAR has templating packages, none of which I've used. Is that what you mean?
3:07 pm on Oct 22, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I did find it what I was looking for was the HTML_Template_IT file. It requires PEAR but doesn't come with it as a default included file. If you program in PHP you should really look into templates they make life much easier.
6:28 pm on Oct 22, 2008 (gmt 0)

5+ Year Member



andrewsmd, I'm not sure what you're looking for. If you're looking a template system in PHP, I suggest you do some research and look up for the Smarty PHP Template Engine.

Smarty helps you:
- Separate application logic from presentation.
- Cache your pages and dramatically speed up your application.
- Use built-in functions or your own custom functions to change the look and feel of your template.

6:49 pm on Oct 22, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I looked at smarty and it seems to me like it is basically the same thing as what I used in my previous post. The only difference is with the template class I use you define blocks. Like so
<!-- BEGIN blockName -->
{thisIsATemplateVariable}
<p>some random HTML</p>
{moreVariables}
<!-- END blockName -->
and then set the block with php
and the template variable in basically the same manner.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month