On Mon, 16 Aug 2004 09:31:04 +0300, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I took a look to Smarty and Savant templating systems, and  I like a few
> things from both of them.
> However, none of them are satisfactory.
> 
> I don't like Smarty because it needs another language and I find Savant more
> easy to use.

You could say that Smarty is "another language", but it is basically
PHP wrapped in a new syntax. It's pretty simple to learn and has great
documentation. I've also found it quite easy to use and flexible.

> 
> I would like to have a templating system that:
> 1. Separates:
> - the programming part (the main programs and the modules)
> - the structure and main design of the site (the templates)

This is a completely developer(you)-defined thing. You can quite
easily *not* seperate the Model, View, and Controller parts of your
website, even using a template system like Smarty. The impetus for
seperating these things comes from you, developer.

> - The content of the site, this meaning the body text, the title, keywords,
> and all other variables.

Again, you can choose how to do such a thing with your templates by
not supplying any ststic text, but sending it in variables.

> - Other files that can be included, like Javascript, .css, images, files
> that can be downloaded, etc.

These just sit on your webserver and are linked to in your templates.
The template language would very rarely have anything to do with this.

> 
> 2. The templates should handle more languages, and all the content parts
> should be able to appear in every language supported.

Again, this is a question of your design. You can choose to make all
text be variables and pull that text from...wherever you want it.
Easiest way would be to use a system like:
http://pear.php.net/package/Translation
or
http://pear.php.net/package/Translation2

> 
> 3. The program should be able to create a cache but not one containing PHP,
> but one that is just simple html that can be loaded from a cached file and
> presenting to the client.
> (I don't know how to decide yet when to re-create the cached file)
> 

Smarty can do this. It caches both compiled Smarty templates (as PHP
files) and static HTML output of those templates. You can turn off any
of these features. You can make it recompile everything when the
original template is changed. Etc etc etc.

> If someone uses this templating system, someone can modify the design by
> modifying the templates and this change will be reflected in every language.
> If a translator add a new language or modifies a certain translation, the
> design won't be affected.

Modify template, site changes. If you want multiple languages to use
one template, again, that's your design decision.

> The programmer could add a new program for a new page that does something
> new, or new modules, etc.
> 
> I couldn't find such a thing yet and I think I will have to create it.
> 

Sounds like you're looking for a whole Content Management System
(CMS). Try looking into those if you don't want to have to build this
stuff together. I like TYPO3 personally.

> Teddy
> 
> 
> 
> ----- Original Message -----
> From: "Justin French" <[EMAIL PROTECTED]>
> To: "Octavian Rasnita" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, August 16, 2004 4:38 AM
> Subject: Re: [PHP] PHP templates
> 
> > On 15/08/2004, at 7:02 AM, Octavian Rasnita wrote:
> >
> > > Hi all,
> > >
> > > I have seen that there are many templating systems for PHP. Which is
> > > the
> > > most used and the best you have found?
> > > Can you recommend me a free and good templating system?
> 

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to