From: Richard S. <ri...@ri...> - 2003-10-22 22:56:40
|
Currently in PWS the processTemplate() function will not process a template if the values of the first paramater was NULL, blank, or if there where no {TEMP} strings in the template. Can it be modified in the future to still process templates even though array(NULL) or array() was passed to it? If I want a template to be used right now and for some reason the user left some stuff blank I add a string in the template called {FOO} and append $array['FOO']=' '; just to make sure the template gets processed each time. Is there a better way to possible do this? What do you guys think? - Richard S. |
From: Steven L. <st...@tu...> - 2003-10-24 18:40:11
|
On Wed, 2003-10-22 at 18:35, Richard Sumilang wrote: > Currently in PWS the processTemplate() function will not process a > template if the values of the first paramater was NULL, blank, or if > there where no {TEMP} strings in the template. Can it be modified in > the future to still process templates even though array(NULL) or > array() was passed to it? > > If I want a template to be used right now and for some reason the user > left some stuff blank I add a string in the template called {FOO} and > append $array['FOO']=' '; just to make sure the template gets processed > each time. > > Is there a better way to possible do this? What do you guys think? We have run into this same problem. Unfortunately it is a limitation of the PEAR HTML_Template_IT class. We could add a boolean flag to the processTemplate function that would replace NULLs with '' so that the template would still be processed. Does this sound like a reasonable solution? -- Steven Levin Computer Systems Admin I Electronic Student Services Appalachian State University Phone: 828.262.6740 http://phpwebsite.appstate.edu |
From: Richard S. <ri...@ri...> - 2003-10-28 05:18:00
|
Yeah that boolean suggestion will work for me :-D Lets do it! +1 On Oct 24, 2003, at 11:33 AM, Steven Levin wrote: > On Wed, 2003-10-22 at 18:35, Richard Sumilang wrote: >> Currently in PWS the processTemplate() function will not process a >> template if the values of the first paramater was NULL, blank, or if >> there where no {TEMP} strings in the template. Can it be modified in >> the future to still process templates even though array(NULL) or >> array() was passed to it? >> >> If I want a template to be used right now and for some reason the user >> left some stuff blank I add a string in the template called {FOO} and >> append $array['FOO']=' '; just to make sure the template gets >> processed >> each time. >> >> Is there a better way to possible do this? What do you guys think? > > We have run into this same problem. Unfortunately it is a limitation > of > the PEAR HTML_Template_IT class. We could add a boolean flag to the > processTemplate function that would replace NULLs with '' so that the > template would still be processed. Does this sound like a reasonable > solution? > > -- > Steven Levin > Computer Systems Admin I > Electronic Student Services > Appalachian State University > Phone: 828.262.6740 > http://phpwebsite.appstate.edu > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |
From: Steven L. <st...@tu...> - 2003-10-29 16:03:06
|
On Tue, 2003-10-28 at 00:11, Richard Sumilang wrote: > Yeah that boolean suggestion will work for me :-D Lets do it! > > +1 > > > > On Oct 24, 2003, at 11:33 AM, Steven Levin wrote: > > > On Wed, 2003-10-22 at 18:35, Richard Sumilang wrote: > >> Currently in PWS the processTemplate() function will not process a > >> template if the values of the first paramater was NULL, blank, or if > >> there where no {TEMP} strings in the template. Can it be modified in > >> the future to still process templates even though array(NULL) or > >> array() was passed to it? > >> > >> If I want a template to be used right now and for some reason the user > >> left some stuff blank I add a string in the template called {FOO} and > >> append $array['FOO']=' '; just to make sure the template gets > >> processed > >> each time. > >> > >> Is there a better way to possible do this? What do you guys think? > > > > We have run into this same problem. Unfortunately it is a limitation > > of > > the PEAR HTML_Template_IT class. We could add a boolean flag to the > > processTemplate function that would replace NULLs with '' so that the > > template would still be processed. Does this sound like a reasonable > > solution? Richard, Have you tried the showBlocks parameter that is already part of the processTemplate function ? -- Steven Levin Computer Systems Admin I Electronic Student Services Appalachian State University Phone: 828.262.6740 http://phpwebsite.appstate.edu |