So after making my site look pretty, and creating my banner image, I decided that I'd like to create a few images and have them rotate randomly on my blog. The first complication I discovered is that all of the pages are cached by BlogCFC, so simply introducing code into layout.cfm to rotate the image wouldn't work.
Having spent a few hours last night messing with BlogCFC code, I didn't really want to delve into it again to figure out a way around the caching issue, so I came up with a solution that is probably the "hackiest" thing I've done in ages.
I set up a scheduled task in CF that will randomly select one of 5 images that I've created for banner and then copy that image overtop of an image called MyBanner.jpg. MyBanner.jpg is what my img tag points to in layout.cfm. I'm running that task hourly, so now, even though the page stays cached, the image rotates randomly every hour.
Here's the code for RotateBanner.cfm:
<cfset ImageList = "chile_banner_2,chile_banner_3,chile_banner_5,chile_banner_6,chile_banner_7" />
<cffile action="copy" source="#dir##ListGetAt(ImageList,RandRange(1,ListLen(ImageList)))#.jpg" destination="#dir#MyBanner.jpg">
I'm not particularly proud of the code, but hey, I got the job done in about 10 minutes.