Image Gallery Template

I know how to take a set of images and create a thumbnail gallery viewer, but I want to do more with it. I want to be able to add pictures to the gallery, or change which folder of pictures the gallery views alltogether… all without editing the file each time. Anybody know how?