[Templates] indentation and text files

Mark Mills mark@xodiax.com
Wed, 1 Jan 2003 14:52:10 -0500


> -----Original Message-----
> From: valerian [mailto:valerian2@hotpop.com]
> Subject: [Templates] indentation and text files
>=20
> Is there a trick or something to handle indentation sort of=20
> like Perl's
> "here documents"?  I like to indent my if/then/else statements in the
> templates, and indentation has no visible side-effects with HTML
> documents, but with plain text files it messes up the formatting.  For
> instance, if my template looks like this:
>=20
> [% IF blah %]
> 	blahblah, lots of
> 	text here
> [% ELSE %]
> 	show this instead
> [% END %]

I tend to reverse my tabbing scheme and indent all my tags
in cases like that.

It sounds cheap but it works pretty good visually and doesn't
require any extra "hard thinking" or hidden "fix it" routines.

In a document full of left justified stuff, the rare indent is
rather visually distinct, or people wouldn't be doing paragraph
indents that way. :)

	[% IF blah %]
blahblah, lots of lorem ipsum etc blah
text here verbiage fake words for effect
	[% ELSE %]
show this instead...
	[% END %]


--mark