if i have the following at the start of a template:
[%- DEFAULT
mc = 'WPJF1'
-%]
[%- IF mc == 'WPJF1' -%]
[%- SET shipping = '4.95' -%]
[%- ELSIF mc == 'WPJF4' -%]
[%- SET shipping = '2.95' -%]
[%- END -%]
shouldnt this remove all whitespace and newlines proceeding the doctype
line?
Here here, I second that... mod_perl handlers are a massive speed
bump...
even PerlRun scripts have a bump over regular cgi.
Perrin Harkins wrote:
On Wed, 2004-12-22 at 08:10 -0500, Robert wrote:
I am just wondering if CGI has a speedup with Apache2 over Apache1. I have
not goog
I can't speak to it on windows but we have been using A2 and MP2
for quite sometime now... ( upwards of a year )... anyway...
very stable... only one mp bug that hit us and a quick upgrade took
care of that...
site in question was serving about 15 gigs of data a month... so...
judge for yours
Well that isnt a string per-se,
its a date...
pirint "good\n" if ( '2004-11-23' < '2004-11-26' );
doesnt print good either...
use the date plugin in particular say
the interface to Date::Calc
and turn the dates into unix epochs that you can compare
Oleg Burlaca wrote:
Hi!
How can I compare two stri
Just want to make sure my understanding is right on this,
as I just started using tt recently.
If I do something like ( just hightlighting the relevent points )
$t = new Template( VARIABLES => { blah } );
$t->process( , OTHERBLAH );
does it do:
create template
doing substitutions for blah
process w
Perrin Harkins wrote:
[ Please CC the list on all replies... ]
On Mon, 2005-01-03 at 16:41 -0500, Sean T Allen wrote:
Hmmm.. sorry i should have been more clear... but i was trying to get
right to the main point
I Have a template that contains country and state and user address
Perrin Harkins wrote:
On Mon, 2005-01-03 at 17:42 -0500, Sean T Allen wrote:
if I need to only instantiate 1 instance of Template ( so long as
options passed to the constructor don't change ).
then it would make sense for me to create the instance as a singleton.
using say A
Michael Peters wrote:
Perrin Harkins wrote:
On Mon, 2005-01-03 at 17:39 -0500, Arshavir Grigorian wrote:
The stash contents should be passed to all templates that you call
already. That's the default behavior.
I am not sure what you mean. Could you please explain this a little
more?
My assumpti
Octavian Rasnita wrote:
...regarding caching...
If I have a site which is updated dayly, once per each day, it would be
helpful if TT could create a cache of the final result (the html page) like
proxy server do, and recreate again the web page after each new day...
Is something like this possible
Are there any modules to get tt2 and Spreadsheet::Excel to play nice
together so I can still format using template toolkit but have
Spreadsheet:::Excel
to do the final output...
Just checking before I recreate the wheel..
begin:vcard
fn:Sean T. Allen
n:Allen;Sean T.
org:USA Herbals, LLC
email;int
setting formats on columns and whatnot...
not horribly complicated... but enough that i need to
create an actual xls file
Simon Wilcox wrote:
On Thu, 6 Jan 2005, Sean T Allen wrote:
Are there any modules to get tt2 and Spreadsheet::Excel to play nice
together so I can still
Mike Whitaker wrote:
Did you know that you can create an html page, give it a .xls extension
and Excel will quite happily open it without a single complaint ?
...except if you're on an OS without an Excel reader :)
Shouldn't be too hard to wrap SS::WE in Template::Plugin::Class, surely?
My thought
I have a file defined that comes from a template.
I would like to keep said file... still use tt
but spit out excel from it using Spreadsheet::WriteExcel.
why?
because due to some client nastiness i actually had to embed some logic
in the template...
much as i hate to do it... or rewrite a section
Thomas, Mark - BLS CTR wrote:
I have a file defined that comes from a template.
I would like to keep said file... still use tt
but spit out excel from it using Spreadsheet::WriteExcel.
Couldn't you just do something like this?
$tt->process($template, $vars, \&create_excel
Thomas, Mark - BLS CTR wrote:
Sean T. Allen wrote:
That doesnt really take into account setting formats and all tho does it?
Sure. You do it in your build_excel() routine with SS::WE. Is there
something I'm missing?
Well what are you thinking? Perhaps I
Thomas, Mark - BLS CTR wrote:
Sean T. Allen wrote:
With yours wouldnt I have to add custom xsl format
tags in the output for the template so that when
it gets passed to build_excel, it can parse
again and call the appropriate format routines?
Not at all. How did xsl
for styling an entire row or column
hmmm...
interesting... because for an excel file using SpreadSheet::WriteExcel
it could just
be done at the end... I suppose for a tsv or csv or something it could
either ignore
styling altogether or it starts to get pretty complicated.
Sean T Allen wrote
Title: Message
Thomas, Mark - BLS CTR wrote:
But again I havent thought this all the way through...
but something like
[% USE sheet = spreadsheet( filetype ) %]
[% FOREACH row IN rows %]
[% sheet.start_row() %]
[% FOREACH cell IN row.cells %]
[% sheet.add_cell( ce
Todd Freeman wrote:
On Thu, Jan 06, 2005 at 11:41:34AM -0500, Thomas, Mark - BLS CTR wrote:
I use both TT and Spreadsheet::WriteExcel, yet I'm not sure what you're
trying to accomplish. Why are you trying to combine the two? Are you trying
to create Excel templates with embedded TT
Todd Freeman wrote:
On Fri, Jan 07, 2005 at 10:45:38AM -0500, Sean T Allen wrote:
Todd Freeman wrote:
Can't speak for the others... but personally I would love to be able to do
just that... being able to take one data set and do
$template->proc
From the directive manual:
/
When the FOREACH directive is used without specifying a target variable,
/
/any iterated values which are hash references will be automatically
imported./
/*[% userlist = [
{ id => 'tom', name => 'Thomas' },
{ id => 'dick', name => 'Richard
i havent gotten anything from the list in about 6 days... just a check
here...
begin:vcard
fn:Sean T. Allen
n:Allen;Sean T.
org:Ardis Marketing Group
adr;dom:;;;New York;NY
email;internet:[EMAIL PROTECTED]
title:Tech Guru
x-mozilla-html:FALSE
url:http://ardismg.com/
version:2.1
end:vcard
Need a quick explanation of something...
we have a custom plugin that creates content so that...
[% plugin.return_stuff(); -%]
returns data for tt2 to output
if dump the data to a tmp file before return_stuff actually returns the
data...
it is fine
however, tt2 is adding an extra \n at the end
so
Josh Rosenbaum wrote:
Is it possible your plugin is returning the newline? If it is, then:
[% plugin.return_stuff() | trim -%] should do the trick. If that's
not the case then I suggest turning on template compilation, and then
you can check out the compiled template to see if TT is actually
ad
24 matches
Mail list logo