定义标签后,还要增加相应的配置
FreeMarker标签类需要在/src/main/resources/conf/plugin/plug/context.xml
文件中声明
<bean id="PlugResumeList" class="com.jspxcms.plug.web.directive.ResumeListDirective" />
然后在/src/main/resources/conf/plugin/plug/conf.properties
文件中加入一下代码:
freemarkerVariables.ResumeList=PlugResumeList。
在模板中调用标签的名称是ResumeList
,而非PlugResumeList
。
分页数量取决于你返回的pagedList对象,如果你返回的pagedList对象中的totalPages
是1,那分页数量就是1。
参考文档:Page(pagedList)对象