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 |