add global templates cache, allows to call same popup from multiple sources