String defaultLayout = WebUtils.getParamValue("APP_LAYOUT", request);
layout = G4Utils.isEmpty(layout) ? defaultLayout : layout;
dto.put("layout", layout);
dto.put("themeColor", getThemeColor(theme));
TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
DefaultTemplate template = new FileTemplate();
template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName()));
StringWriter writer = engine.mergeTemplate(template, dto);
String treesString = generateCardTrees(dto);
return treesString + "\n" + writer.toString();
}