栏目生成

This commit is contained in:
tianbj 2019-12-28 11:18:31 +08:00
parent 9c9556ea47
commit fdd1c49b62
1 changed files with 88 additions and 85 deletions

View File

@ -80,11 +80,11 @@ public class CmsParserUtil extends ParserUtil {
cfg.setTemplateLoader(ftl); cfg.setTemplateLoader(ftl);
} }
// 移动端模板 // 移动端模板
try{
Template mobileTemplate = cfg.getTemplate( Template mobileTemplate = cfg.getTemplate(
BasicUtil.getApp().getAppMobileStyle() + File.separator + column.getCategoryListUrl(), Const.UTF8); BasicUtil.getApp().getAppMobileStyle() + File.separator + column.getCategoryListUrl(), Const.UTF8);
// pc端模板 // pc端模板
Template template = cfg.getTemplate(File.separator + column.getCategoryListUrl(), Const.UTF8); Template template = cfg.getTemplate(File.separator + column.getCategoryListUrl(), Const.UTF8);
// 文章的栏目模型编号 // 文章的栏目模型编号
String columnContentModelId = column.getMdiyModelId(); String columnContentModelId = column.getMdiyModelId();
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
@ -181,6 +181,9 @@ public class CmsParserUtil extends ParserUtil {
} catch (TemplateException e) { } catch (TemplateException e) {
e.printStackTrace(); e.printStackTrace();
} }
}catch (TemplateNotFoundException e){
e.printStackTrace();
}
} }
/** /**