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
Thanks to all for the advice!
Sean
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates
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
> 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
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
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:
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 %]