Added support for "readonly" templates