Re: [phplib] Template extensions & PHP in templates From: nathan r. hruby (nathan <email protected>)
Date: 07/26/01

On Thu, 26 Jul 2001, Jesse Swensen wrote:

> on 7/26/01 4:02 PM, Peter Bowyer at reywob <email protected> wrote:
>
> > Does anyone have an extension which will allow PHP code in the templates to
> > be executed?
>
> But isn't that what PHP is all about. Depending on how you look at it, PHP
> is a template. The difference being instead of {VAR} you would write <?
> print $var;?>. I think there is even a shortcut for print.
>

Yeah kind of.. you could easily do
<?php
  include('./header.html');
  //insert template code here
  include('footer.html');
?>

This is pretty much what the phplib.netuse.de site does currently, only
backward. All that grey crap is in .tpl files and the the stuff in the
middle is in mixed html / php

> I have never been a big supporter of templates, even though a lot of people
> use them. Maybe it is because I do both HTML and PHP on my projects.
>

Templates rock mightily, espically when you're an app devloper and want to
give your users the ability to completely change the look your product.

-n

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
nathan hruby / digital statement
nathan <email protected>
http://www.dstatement.com/

Public GPG key can be found at: http://www.dstatement.com/nathan-gpg-key.txt ED54 9A5E 132D BD01 9103 EEF3 E1B9 4738 EC90 801B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>