I wrote my own template system that works very well... I've got an outer
control file that handles the user input, sets the variables for what the
template should use of stylesheets and menus and such, and a variable for
what body to use. All my body files are either PHP programs in themselves
mixed with HTML presentation (I try to keep near all the PHP in the start,
and the actual presentation generation at the end).

Basically it means that the template only holds the basic table structure of
the site, and a little code to include the files that are needed to make it
into what it's suppose to look like.

The way I made it I can use the same template file all over the site, or
make another template and tell the control scripts to use that instead. I
still haven't made it possible for the menu system to change looks though,
but I plan to add that in the future...

It would be very easy to change my system to allow it to use different
templates or other elements based on various conditions....

FWIW

Rene

Fate would have it, that on Sat, 24 Jan 2004 09:53:16 +0300, Hamid Hossain
wrote:

>Hi,
>
>Always I have a problem that I don't know how to make my code away from the 
>user interface files.
>
>I tried to use some template classes, but I did'nt like what I tired because 
>some if statments are used inside the template.
>
>How can I prepare my code to be working in more that one template? Should I 
>use some methodology like FuseBox.org
>
>Regards,
>Hamid Hossain

-- 
Rene Brehmer
aka Metalbunny

http://metalbunny.net/
References, tools, and other useful stuff...

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

Reply via email to