Textual models in MDD typically are generated in their concrete syntax using a template based language. On the contrary, graphical models as a generated in abstract syntax and then visualized, which is not very efficient for complicated languages. The paper discusses a case of template based generation of graphical models in a concrete syntax. We apply this approach to generation of programs in MOLA transformation language using the Template MOLA language. A novel idea of merge mechanism in MOLA templates is proposed which permits to obtain the required structure of generated models in an easy way.