Date: 05/11/01
- Next message: James Carrier: "[phplib] OT: SQL Question"
- Previous message: Stephen Woodbridge: "[phplib] phplib Template work being done for PHPWidgets!"
- In reply to: nathan r. hruby: "Re: [phplib] replacement variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yup that makes a lot of sense, i can have an array of variables, loop
through each one and do set_var on it.
Just thought of another advantage, as all my setting variables will be
stored in a mysql table, i can let the user create another replacement
variable that they can use without having to change any code at all. True
seperation of design from function :)
I have one question about processing time, is there going to be a large
performance drop doing a set_var on say 50 variables for every page? i ask
because not all variables would get used on every page, i just wonder if it
is worth adding extra code to only call the variables that are used by that
specific template.
Thanks for the help
p.s. complete aside: re: reply-to
My reason for suggesting munging the reply to address (learnt a new word
anyway) is i think when replying most people will not reply to the list with
a follow up, mainly because most of us probably feel other people won't be
interested or whatever. Should i have repied to this message to the group or
to the specific person who sent it? i think i would natrually verge on the
conservative side and more often reply to the individual. This is however
bad as other people listening in miss out. JMHO.
chris
>
> Can't you parse cellpadding as a varaible in the template? Liek having an
> array of display vars that are set from some UI or config file?
>
> <!-- someTpl.tpl -->
> <table cellpadding="{CELLPADD}">
> blah blah blah
> </table>
> <!-- END -->
>
> /* somePage.php */
> $t->set_var("CELLPADD", $displayOpts["cellpadding"]);
> //Parsing continues...
>
> -n
>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: James Carrier: "[phplib] OT: SQL Question"
- Previous message: Stephen Woodbridge: "[phplib] phplib Template work being done for PHPWidgets!"
- In reply to: nathan r. hruby: "Re: [phplib] replacement variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

