Have you ever had this problem....

You have a dynamic web site. Let's say selling weapons of mass distruction and cookies. You create your database tables for the weapons and cookies. You build your front end. At the same time, however, you have a few pieces of content that you need to be dynamic - but aren't really database things. Maybe it's a quote of the day "Nothing says love like a particle cannon with sugar cookies on the side..." or maybe it's simply the "About our Weapons and Cookies" page.

You could use a content management tool like Contribute. Or you could do what I normally end up doing. Edit locally and FTP. Find a typo. Curse. Fix the typo. Upload. Find another typo. Curse again and kick the dog. Upload. Remember something you wanted to add. Curse, kick the dog, and fire the maid. Repeat.

There isn't a real simple way to handle the... random crap I suppose... of web sites.

I've built a simple custom tag that I think will do the job nicely. It's called the SimpleContentEditor, or SCE for short. I'm considering adding it to BlogCFC so folks can use it to edit pod content, footer content, or whatever they want.

It works very simply. Instead of a block of text where you would normally put the text, you place a call to the tag and pass in a unique name, like QuoteOfTheDay. SCE will look for a folder underneath the custom tag called "data." It will then look for a text file called QuoteOfTheDay.txt. It will then read in that text file, cache it to the Application scope, and display it.

The tag also takes a boolean attribute called editmode. You would pass true to this attribute if the user is currently authenticated. That will differ depending on your site. If the tag determines that editmode is true, a link is created that uses JavaScript to launch a pop up window allowing you to edit the content.

This hasn't been tested heavily yet - so give it a whirl and tell me what you think. You can download the tag here.

Edited Thanks to Birgit for finding a bug. Zip updated.

Edited Another bug fixed at 8:29PM EST.