added the ability to pass functions as templates for collection renderin...

...g