* Sean T Allen <sean at usaherbals.com> [2004/12/13 11:48]: > 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 -%] > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > > > shouldnt this remove all whitespace and newlines proceeding the doctype > line?
You could just do it like this:
[%- DEFAULT
mc = 'WPJF1';
IF mc == 'WPJF1';
SET shipping = '4.95';
ELSIF mc == 'WPJF4';
SET shipping = '2.95';
END;
-%]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
This way, there is no chance of whitespace slipping through. Plus,
it's a little easier to read.
(darren)
--
When correctly viewed, everything is lewd.
-- Tom Lehrer
pgp3ioSZ4Y3Sk.pgp
Description: PGP signature
