homepage Welcome to WebmasterWorld Guest from 54.227.40.166
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP Templates
andrewsmd




msg:3755563
 1:59 pm on Sep 30, 2008 (gmt 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,

 

eelixduppy




msg:3771184
 2:54 pm on Oct 22, 2008 (gmt 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?

andrewsmd




msg:3771196
 3:07 pm on Oct 22, 2008 (gmt 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.

cosmoyoda




msg:3771318
 6:28 pm on Oct 22, 2008 (gmt 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.

andrewsmd




msg:3771322
 6:49 pm on Oct 22, 2008 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved