Re: [PHP] Template Question

2005-11-14 Thread Robert Cummings
On Mon, 2005-11-14 at 23:42, Leonard Burton wrote: > HI All, > > In your template parsing classes do you put the code for tags in > seperate files or do you have some kind of array or other method of > assigning the action associated with the tag? > > I have been putting the code for the tags in

[PHP] Template Question

2005-11-14 Thread Leonard Burton
HI All, In your template parsing classes do you put the code for tags in seperate files or do you have some kind of array or other method of assigning the action associated with the tag? I have been putting the code for the tags in a dat/tag.dat file and then including the file wherever the tag i

Re: [PHP] Template Question

2004-08-17 Thread Jonathan Hadddad
Rather than kill myself trying to do this, I'm simply cutting the file at the content point and saving each half of the file, and using INCLUDE("Start.php") and INCLUDE("finish.php"). Template variables are included in the $template array. As far as the actual template is concerned, I'll keep

Re: [PHP] Template Question

2004-08-14 Thread John Holmes
Jonathan Haddad wrote: eval takes a string and evaluates it as PHP, which I also thought would work. But this is a file of mixed PHP and HTML. If your file starts off in HTML mode, then: $file = file_get_contents('yourfile.php'); eval('?>'.$file.' -- ---John Holmes... Amazon Wishlist: www.amazon.

Re: [PHP] Template Question

2004-08-14 Thread rush
"Jonathan Haddad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] eval takes a string and evaluates it as PHP, which I also thought would work. But this is a file of mixed PHP and HTML. I've designed it this way because I work with guys that are dreamweaver crazy and want to do all th

Re: [PHP] Template Question

2004-08-13 Thread Stephan Fiedler
Hi Jonathan, Jonathan Hadddad wrote: > [code in a template] Think you're right this IS a problem. Use Templates to seperate code from the ouput 'layer'. If you still have code in your template, maybe it's bad design. why don't you simply add some more variables to your template and tell the templa

Re: [PHP] Template Question

2004-08-13 Thread Jonathan Haddad
eval takes a string and evaluates it as PHP, which I also thought would work. But this is a file of mixed PHP and HTML. I've designed it this way because I work with guys that are dreamweaver crazy and want to do all their layout there. Maybe I should parse the file, and eval() the PHP and ech

Re: [PHP] Template Question

2004-08-13 Thread John Holmes
Jonathan Hadddad wrote: if there's any PHP code in the template file, it just gets echoed to the page. is there any way to have the code between the evaluated instead of just echoed?? I realize an include would work, but the goal is to use a single file as the template. anyone got any suggestion

[PHP] Template Question

2004-08-12 Thread Jonathan Hadddad
Here is my situation: I have created a template system. A template is a single file that simply has the word {content} in it where the content belongs. The logo and the nav are in the template. The first half of the file is read (up to {content} ). Then the content from the actual file is eval