Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [webmaster33] [Suggestion] Reuse DB connection in template tags

Quote Reply
Re: [webmaster33] [Suggestion] Reuse DB connection in template tags In reply to
What's the benefit of Jason modifying the parser to work like this?

You have two choices:

a) Write your perl code inside the template (your idea)
b) Create a global

What makes putting the code in the template better?

I'd have to say that you would end up having "code tags" scattered through your templates which makes updates difficult whereas at least globals are all in one place. There will be no speed gain or any other obvious advantage that I can think of unless you can elighten me?

Plus, Jason would have to do quite a bit of work on the parser to implement this (your suggestion of sub\s{.+} is extremely simplified and optimistic. Have you looked at the source code for GT::Template::Parser?)
Subject Author Views Date
Thread [Suggestion] Reuse DB connection in template tags webmaster33 6496 Jan 22, 2003, 7:28 AM
Thread Re: [webmaster33] [Suggestion] Reuse DB connection in template tags
Paul 6337 Jan 22, 2003, 7:32 AM
Thread Re: [Paul] [Suggestion] Reuse DB connection in template tags
webmaster33 6310 Jan 22, 2003, 8:26 AM
Thread Re: [webmaster33] [Suggestion] Reuse DB connection in template tags
Paul 6330 Jan 22, 2003, 8:32 AM
Post Re: [Paul] [Suggestion] Reuse DB connection in template tags
webmaster33 6288 Jan 22, 2003, 8:53 AM
Thread Re: [webmaster33] [Suggestion] Reuse DB connection in template tags
Alex 6261 Jan 22, 2003, 11:56 AM
Post Re: [Alex] [Suggestion] Reuse DB connection in template tags
Alex 6281 Jan 22, 2003, 11:57 AM
Thread Re: [Alex] [Suggestion] Using object variables & methods in template tags
webmaster33 6254 Jan 22, 2003, 1:56 PM
Thread Re: [webmaster33] [Suggestion] Using object variables & methods in template tags
ridesworld 6243 Jan 22, 2003, 2:11 PM
Thread Re: [ridesworld] [Suggestion] Using object variables & methods in template tags
webmaster33 6220 Jan 22, 2003, 2:26 PM
Thread Re: [webmaster33] [Suggestion] Using object variables & methods in template tags
ridesworld 6195 Jan 23, 2003, 5:59 AM
Post Re: [ridesworld] [Suggestion] Using object variables & methods in template tags
Paul 6198 Jan 23, 2003, 6:03 AM
Thread Re: [ridesworld] [Suggestion] Using object variables & methods in template tags
webmaster33 6216 Jan 23, 2003, 6:36 AM
Thread Re: [webmaster33] [Suggestion] Using object variables & methods in template tags
ridesworld 6212 Jan 24, 2003, 12:19 AM
Post Re: [ridesworld] [Suggestion] Using object variables & methods in template tags
webmaster33 6180 Jan 24, 2003, 4:00 AM
Thread Re: [Alex] [Suggestion] Reuse DB connection in template tags
pugdog 6176 Jan 30, 2003, 5:56 AM
Post Re: [pugdog] [Suggestion] Reuse DB connection in template tags
webmaster33 6182 Jan 30, 2003, 6:19 AM