}
public void renderDetail(CmsArticle cmsArticle) {
try {
Map<String, Object> data = new HashMap<String, Object>();
CmsCatalog cmsCatalog = cmsArticle.getCmsCatalog();
data.put("article", cmsArticle);
data.put("catalog", cmsCatalog);
String html = templateService.render(
cmsCatalog.getTemplateDetail(), data);
String path = baseDir + "/cms/html/" + cmsArticle.getId() + ".html";
PrintWriter writer = new PrintWriter(new OutputStreamWriter(
new FileOutputStream(path), "UTF-8"));
writer.print(html);
writer.flush();