Re: [Templates] The ghost of templates future

2009-02-17 Thread Larry Leszczynski
Hi Kelly - On Mon, 16 Feb 2009 15:40 -0500, "Kelly Thompson" wrote: > I see no reason to have external js links, with a template system, other > than "hiding code". > > Back in the day, it was nice to be able to edit one js file, and all > pages change. With Templates that's obsolete. > > I edi

Re: [Templates] The ghost of templates future

2009-02-17 Thread sean
Thanks to all for the advice! Sean ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] The ghost of templates future

2009-02-16 Thread Bill Moseley
On Feb 16, 2009, at 1:45 PM, Andy Wardley wrote: > Hi Sean, > > The way I normally approach this is to have a PRE_PROCESS config > file which does something like this: > >[% page = { > headers = [ ] > } >%] > > Then in the main template, or a template called from it, you c

Re: [Templates] The ghost of templates future

2009-02-16 Thread Matt Hucke
> I have actually made a whole bunch of javascript templates, and pick and > choose which ones get included. Same here, but I do it listwise: [% # (assuming some "page" hash already exists): page.pagetitle="foo"; page.extra_scripts = page.extra_scripts || [ ] ; page.extra_s

Re: [Templates] The ghost of templates future

2009-02-16 Thread Andy Wardley
Hi Sean, The way I normally approach this is to have a PRE_PROCESS config file which does something like this: [% page = { headers = [ ] } %] Then in the main template, or a template called from it, you can write: [% page.headers.push('') %] The final trick is to us

Re: [Templates] The ghost of templates future

2009-02-16 Thread Kelly Thompson
My Gmail sent that message before I was done typing...I hit some wrong button(WONDEFUL keyboard short cuts!!) I meant to finish... I have something very similar, I use for including Google Maps. What I do, is just use the same test that was preformed for including MyButton.html. eg:

[Templates] The ghost of templates future

2009-02-16 Thread sean
Hi, and thanks for TT, I'm wondering what is the best way to include information from later templates in a given template. For example, let's say I have an HTML page like: [% IF something() %] [% INCLUDE MyButton.html %]