CKEDITOR.addTemplates("default", {
   imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath("templates")+"templates/images/"),
   templates:[
{foreach $templates as $template}
      {
         title:"{$template.name}",
         //image:"template1.gif",
         //description:"",
         html:"{$template.text|escape:'javascript' nofilter}"
      },
{/foreach}
]});