页面模板

半个月前,第一次真正意义上的接触页面模板,以前都是在搭好的框架里写写模块,页面样式基本也都是早已存在的,因而一直没有什么强大的认识,一直傻傻的认为页面的样式是一点一点写出来的。
有一次,模块出错,调了多次任无力回天,于是让老大帮忙调了一下,老大看着浏览器上苍白的页面,没有说话,默默地在网上搜了一个比较好看的页面模板,然后,开始了看似漫长的修改。页面其实也没有想像的那么夸张,把模板的js、images、css 复制到项目中后,然后在页面中引入要用到的js、css、等文件,可以在框架中引入header和footer文件,然后在页面中修改修改对应组件的class就行了。
还别说,加入页面模板,看起来瞬间就专业多了。
*下面附上ofbiz框架的修饰器:
<screen name="main-decorator">
<section>
<actions>
<property-map resource="StorageUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="StorageLabels.xml" map-name="uiLabelMap" global="true"/>
<set field="layoutSettings.shortcutIcon" value="/storage/images/Storage.ico" global="true"/>

<set field="layoutSettings.styleSheets[]" value="/storage/images/css/bootstrap.css" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/storage/images/css/site.css" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/storage/images/css/bootstrap-responsive.css" global="true"/>
<set field="layoutSettings.javaScripts[]" value="/storage/images/js/jquery.js" global="true"/>
<set field="layoutSettings.javaScripts[]" value="/storage/images/js/bootstrap.min.js" global="true"/>


<set field="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC[0]" default-value="component://storage/webapp/storage/includes/header.ftl"/>
<set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://storage/webapp/storage/includes/footer.ftl"/>
<set field="leftTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://storage/webapp/storage/includes/left.ftl"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://storage/webapp/storage/includes/headerHead.ftl"/></html></platform-specific>
<container id="header"><platform-specific><html><html-template location="${headerTemplateLocation}"/></html></platform-specific></container>
<container style="container-fluid">
<container style="row-fluid">
<container style="span3">
<platform-specific><html><html-template location="${leftTemplateLocation}"/></html></platform-specific>
</container>
<!-- <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific> -->
<platform-specific><html><html-template location="component://storage/webapp/storage/messages.ftl"/></html></platform-specific>
<container style="span9">
<container style="row-fluid">
<decorator-section-include name="body"/>
</container>
</container>
</container>
<container id="footer"><platform-specific><html><html-template location="${footerTemplateLocation}"/></html></platform-specific></container>
</container>
</widgets>
</section>
</screen>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值