Re: [htmltmpl] order of params reported by param() and query()
Brought to you by:
samtregar
From: Brandon B. <br...@oj...> - 2003-02-12 19:24:56
|
Sam, Thanks for the response! Here's my scenario that explains why I want to know field order--perhaps others want to know field order in similar situations. >> Is this a desired feature that would be welcomed into HTML::Template? > >I can't think of any use for it. Why do you want it? In our system: first, administrators create HTML template files; second, users create actual pages by filling in a value for each template variable. In order to let users do this, the system new()s up an HTML template using the file created by the administrator and provides the users with an Add Screen. This Add Screen has a simple form asking for the value of each template variable found in the template. But the Add Screen makes less sense if the fields appear in a different order than in the template. (See example below.) HTML::Template has helped greatly in this project and I believe I'm using it in an intended way that might be fairly common. It makes sense to be able to query() the template and get back the variables in order. Let me know if my example is convincing enough that you would welcome this change into HTML::Template. For example, the administrator might create a HTML template for a fact sheet with these TMPL_VARs: title, fact summary, discussion, works cited. And then the users might see an Add Screen that looks like this: ---------user Add Screen--------- Please enter information for your new Fact Sheet and click "done". title: _____________________________ fact summary: _____________________________ discussion: _____________________________ works cited: _____________________________ ---------/user Add Screen--------- Brandon |