xiaoyong931011
2022-07-07 472f283b4da53a68dddb2ade8a32f646cc475f9f
src/main/java/com/xcong/farmer/cms/core/template/TemplateConfiguration.java
@@ -18,8 +18,8 @@
    private TemplateLoader templateLoader;
    public TemplateConfiguration(String templatePath, String staticPath, String outputPath) {
        super(templatePath, staticPath, outputPath);
    public TemplateConfiguration(String templatePath, String staticPath, String outputPath, String baseUrl, String staticUrl) {
        super(templatePath, staticPath, outputPath, baseUrl, staticUrl);
    }
    public void templateLoader(TemplateLoader templateLoader) {
@@ -34,6 +34,16 @@
        this.templateLoader.data(map);
        Template template = template(templateName);
        template.output(this.outputPath);
        // 判断是否有分页,有则执行。从第二页开始
        int i = 2;
        while(Template.HAS_PAGING) {
            map.put("page", i);
            this.templateLoader.data(map);
            Template pageTemplate = template(templateName);
            pageTemplate.output(this.outputPath);
            i++;
        }
    }
    public Template template(String templateName) {