About

kadyellebee.com is a site for all-things-kristine.

Credits

my life is powered by Six Apart.

« support forums update | Main | no (good) music »

macro whitespace

Something cool I noticed today when testing one of my templates...

When using the Macros plugin for smilies or whatever, there tends to be a lot of extra whitespace in the source at the top of the document where the definitions are. In order to keep things neat in my macros module, I put one definition to a line. Which means there are line breaks that make extra white space.

But, when I moved the <$MTInclude module="macros"$> into the PHP include statement that I use for my header, the white space disappeared. It still works because the macros are processed on rebuild, and the PHP tags process on load... the extra space doesn’t bother the PHP.

Poof! No more ugly whitespace when viewing my source! smile

TrackBack

TrackBack URL for this entry:
http://love-productions.com/mt/mt-tback.cgil/5414

Comments

Excellent! I’ll be modding mine the same way, it bugs me when it does that...

That’s something else I can play with in my templates. I’ve been tinkering with them most of the day. The changes are small, but everything feels neater now. That counts for a lot in my book. smile

Smilies with the macros style increase load time, when you put it into php did it decrease page load time ?

Cool hint. Thanks, I’ll have to implement that myself.

Hey, I was wondering where all that whitespace in my source was coming from. Thanks for sharing this tip! lollypop

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

blushbooksbugbutterflycandlecheckcherriescomputerconfusedexercisefishyflowergemgrinhahaheartkisslollollypopluvyamailmoneymusicaprheartpumpkinrainbowribbonsadsleepysmilesockstrawberrysuntonguetvwink