Hi There,
Unfortunately, although Communities uses MongoDB, it is a different implementation when used with UGC. You would not use MongoDB for the publish tier (Not recommended). The default installation is to use TarMK with MSRP for only the common, 'UGC', content.
What is your use case and why do you want to use MongoDB for templates/content. As using MongoDB for content is only recommended on the author tier. Where MongoDB is used to support clustering
Regards,
Opkar