Esempio n. 1
0
 @SuppressWarnings("unchecked")
 public void execute(
     Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)
     throws TemplateException, IOException {
   CmsSite site = FrontUtils.getSite(env);
   String content = DirectiveUtils.getString(PARAM_CONTENT, params);
   if ("1".equals(content)) {
     String sysPage = DirectiveUtils.getString(PARAM_SYS_PAGE, params);
     String userPage = DirectiveUtils.getString(PARAM_USER_PAGE, params);
     if (!StringUtils.isBlank(sysPage)) {
       String tpl = TPL_STYLE_PAGE_CONTENT + sysPage + TPL_SUFFIX;
       env.include(tpl, UTF8, true);
     } else if (!StringUtils.isBlank(userPage)) {
       String tpl = getTplPath(site.getSolutionPath(), TPLDIR_STYLE_PAGE, userPage);
       env.include(tpl, UTF8, true);
     } else {
       // 没有包含分页
     }
   } else {
     FrontUtils.includePagination(site, params, env);
   }
 }