Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP Templates

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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 10, 2008
posts: 1130
votes: 0


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)

Senior Member

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

joined:Nov 12, 2005
posts:5966
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 10, 2008
posts: 1130
votes: 0


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)

Junior Member

5+ Year Member

joined:Nov 3, 2007
posts:131
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 10, 2008
posts: 1130
votes: 0


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members