Re: [PHP] Re: Question about template systems

2009-03-05 Thread Nathan Nobbe
On Mar 5, 2009, at 4:16 AM, Robert Cummings wrote: On Thu, 2009-03-05 at 03:08 -0800, Michael A. Peters wrote: Robert Cummings wrote: function hiddenInput($document,$name,$value) { $input = $document->createElement("input"); $input->setAttribute("type","hidden"); $input->setAttri

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Michael A. Peters
Robert Cummings wrote: Is there a reason I shouldn't be doing it that way? I didn't say you shouldn't. It's just expensive on every page request to regenerate a document node by node. it also strikes me as tedious :/ It's definitely tedious - but I end up writing functions that do the tedi

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Thu, 2009-03-05 at 03:08 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > >> > >> function hiddenInput($document,$name,$value) { > >> $input = $document->createElement("input"); > >> $input->setAttribute("type","hidden"); > >> $input->setAttribute("name",$name); >

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Michael A. Peters
Robert Cummings wrote: >> >> function hiddenInput($document,$name,$value) { >> $input = $document->createElement("input"); >> $input->setAttribute("type","hidden"); >> $input->setAttribute("name",$name); >> $input->setAttribute("value",$value); >> return($input); >> } >> >

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Thu, 2009-03-05 at 02:04 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > On Wed, 2009-03-04 at 18:01 -0800, Michael A. Peters wrote: > >> Robert Cummings wrote: > >>> On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > > To punt wha

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Michael A. Peters
Robert Cummings wrote: On Wed, 2009-03-04 at 18:01 -0800, Michael A. Peters wrote: Robert Cummings wrote: On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: Robert Cummings wrote: To punt what is repeated over and over during runtime to a single compilation phase when building the t

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Wed, 2009-03-04 at 21:42 -0700, Nathan Nobbe wrote: > On Wed, Mar 4, 2009 at 7:01 PM, Michael A. Peters wrote: > > > echoing html involves mixing html and php. > > Using an XML class (like DOMDocument) to build the document does not. > > > ive actually written a little templating system which

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Wed, 2009-03-04 at 18:01 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: > >> Robert Cummings wrote: > >> > >>> To punt what is repeated over and over during runtime to a single > >>> compilation phase when building the tem

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Nathan Nobbe
On Wed, Mar 4, 2009 at 7:01 PM, Michael A. Peters wrote: > Robert Cummings wrote: > >> On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: >> >>> Robert Cummings wrote: >>> >>> To punt what is repeated over and over during runtime to a single compilation phase when building the temp

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Michael A. Peters
Robert Cummings wrote: On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: Robert Cummings wrote: To punt what is repeated over and over during runtime to a single compilation phase when building the template target. To simplify the use of parameters so that they can be used in arbitra

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Robert Cummings
On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > > > > To punt what is repeated over and over during runtime to a single > > compilation phase when building the template target. To simplify the use > > of parameters so that they can be used in arbitrary ord

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Michael A. Peters
Robert Cummings wrote: To punt what is repeated over and over during runtime to a single compilation phase when building the template target. To simplify the use of parameters so that they can be used in arbitrary order with default values. To allow for the encapsulation of complex content in t

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Robert Cummings
On Wed, 2009-03-04 at 12:15 -0700, Nathan Nobbe wrote: > On Wed, Mar 4, 2009 at 11:51 AM, Robert Cummings wrote: > > > On Wed, 2009-03-04 at 12:46 -0600, Shawn McKenzie wrote: > > > Robert Cummings wrote: > > > > On Wed, 2009-03-04 at 10:55 -0600, Shawn McKenzie wrote: > > > >> Robert Cummings wro

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Nathan Nobbe
On Wed, Mar 4, 2009 at 11:51 AM, Robert Cummings wrote: > On Wed, 2009-03-04 at 12:46 -0600, Shawn McKenzie wrote: > > Robert Cummings wrote: > > > On Wed, 2009-03-04 at 10:55 -0600, Shawn McKenzie wrote: > > >> Robert Cummings wrote: > > >>> On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Robert Cummings
On Wed, 2009-03-04 at 12:46 -0600, Shawn McKenzie wrote: > Robert Cummings wrote: > > On Wed, 2009-03-04 at 10:55 -0600, Shawn McKenzie wrote: > >> Robert Cummings wrote: > >>> On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote: > Matthew Croud wrote: > > Hello, > > > > First

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Shawn McKenzie
Robert Cummings wrote: > On Wed, 2009-03-04 at 10:55 -0600, Shawn McKenzie wrote: >> Robert Cummings wrote: >>> On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote: Matthew Croud wrote: > Hello, > > First post here, I'm in the process of learning PHP , I'm digesting a > few

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Robert Cummings
On Wed, 2009-03-04 at 10:55 -0600, Shawn McKenzie wrote: > Robert Cummings wrote: > > On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote: > >> Matthew Croud wrote: > >>> Hello, > >>> > >>> First post here, I'm in the process of learning PHP , I'm digesting a > >>> few books as we speak. > >>>

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Shawn McKenzie
Robert Cummings wrote: > On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote: >> Matthew Croud wrote: >>> Hello, >>> >>> First post here, I'm in the process of learning PHP , I'm digesting a >>> few books as we speak. >>> I'm working on a content heavy website that provides a lot of >>> informa

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Robert Cummings
On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote: > Matthew Croud wrote: > > Hello, > > > > First post here, I'm in the process of learning PHP , I'm digesting a > > few books as we speak. > > I'm working on a content heavy website that provides a lot of > > information, a template system w

RE: [PHP] Re: Question about template systems

2009-03-03 Thread Chetan Rane
Hi I think what you are looking for is static Header Footer and dynamic content. One way of doing this is by having the front controller pattern For example : consider the following list of files in your application 1000.php 2000.php 1001.php 3000.php In the front controller Pattern we usually

Re: [PHP] Re: Question about template systems

2009-03-03 Thread Ashley Sheridan
On Tue, 2009-03-03 at 20:53 +0100, Martin ZvarĂ­k wrote: > Matthew Croud napsal(a): > > Hello, > > > > First post here, I'm in the process of learning PHP , I'm digesting a > > few books as we speak. > > I'm working on a content heavy website that provides a lot of > > information, a template sys