原文地址:http://javaz.cn/site/javaz/site_study/info/2015/31166.html

项目地址:http://www.freeteam.cn/

FreeCMS商业版提供此功能。

共同拥有两种方式。
1.使用templetPro.do訪问
${contextPath}templetPro.do?

siteid=${site.id}&templetPath=index.html
siteid參数代表网站id。


templetPath參数代表要动态訪问此网站所用模板下的index.html模板。如传递/test/index.html,则代表訪问所用模板下test目录下的index.html模板。


2.使用fhtml后缀訪问
如訪问/site/freecms/index.fhtml,系统会自己主动解析为${contextPath}templetPro.do?

siteid=freecms网站id&templetPath=index.html。


此方法不支持訪问模板子目录下的模板,如/test/index.html。

posted on 2017-05-17 08:10  lxjshuju  阅读(127)  评论(0编辑  收藏  举报