ofbiz 网站或店铺视觉主题(visual Theme)设计
2012-03-18 01:28
225 查看
what why
v.在ofbiz中的应用的主题是可以通过数据来配置的,在webtools 组件中的catalog, content 菜单下可分别设置店铺和网站的主题。且ofbiz在设计前端页面时,不使用table之类的html元素进行布局,而是大量使用div元素进行布局。 这样可以为一个网站或店铺设置多种不同的视觉风格,同时做到html中内容和风格的分离,提高开发效率及可维护性。
how
v.在ofbiz 中的ecommerce 示例中网站的主题是根据一个action 中的 service 的得到的。 而这个Service 使用mini 语言实现的。
在Ecommerce 下的CommonScreens.xml#main-decorator action 中通过service 标签调用 mini 语言实现的服务。
mini 语言实现的服务在ofbiz\framework\common\script\org\ofbiz\common\CommonServices.xml 中。
v.在ofbiz中的应用的主题是可以通过数据来配置的,在webtools 组件中的catalog, content 菜单下可分别设置店铺和网站的主题。且ofbiz在设计前端页面时,不使用table之类的html元素进行布局,而是大量使用div元素进行布局。 这样可以为一个网站或店铺设置多种不同的视觉风格,同时做到html中内容和风格的分离,提高开发效率及可维护性。
how
v.在ofbiz 中的ecommerce 示例中网站的主题是根据一个action 中的 service 的得到的。 而这个Service 使用mini 语言实现的。
在Ecommerce 下的CommonScreens.xml#main-decorator action 中通过service 标签调用 mini 语言实现的服务。
<script location="component://ecommerce/widget/EcommerceSetup.groovy"/> <!-- Get the store VisualTheme --> <set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/> <service service-name="getVisualThemeResources"> <field-map field-name="visualThemeId"/> <field-map field-name="themeResources" from-field="layoutSettings"/> </service> <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/> <set field="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/header.ftl"/> <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/>
mini 语言实现的服务在ofbiz\framework\common\script\org\ofbiz\common\CommonServices.xml 中。
<simple-method method-name="getVisualThemeResources" short-description="Get visual theme resources" login-required="false"> <set field="visualThemeId" from-field="parameters.visualThemeId"/> <set field="themeResources" from-field="parameters.themeResources"/> <entity-condition list="resourceList" entity-name="VisualThemeResource" use-cache="true"> <condition-expr field-name="visualThemeId" from-field="visualThemeId"/> <order-by field-name="resourceTypeEnumId"/> <order-by field-name="sequenceId"/> </entity-condition> <if-empty field="resourceList"> <!-- if not found use the good old initial ofbiz theme so the system will at least start up and will be usable --> <log level="error" message="Could not find the '${visualThemeId}' theme, reverting back to the good old OFBiz theme..."></log> <entity-condition list="resourceList" entity-name="VisualThemeResource" use-cache="true"> <condition-expr field-name="visualThemeId" value="FLAT_GREY"/> <order-by field-name="resourceTypeEnumId"/> <order-by field-name="sequenceId"/> </entity-condition> </if-empty> <if-empty field="resourceList"> <add-error><fail-property property="CommonVisualThemeResourcesNotFound" resource="CommonUiLabels"/></add-error> <check-errors/> </if-empty> <iterate list="resourceList" entry="resourceRecord"> <set field="resourceTypeEnumId" from-field="resourceRecord.resourceTypeEnumId"/> <set field="resourceValue" from-field="resourceRecord.resourceValue"/> <if-empty field="resourceValue"> <property-to-field field="warningMsg" property="CommonVisualThemeInvalidRecord" resource="CommonUiLabels"/> <log level="warning" message="${warningMsg}"/> <else> <set field="themeResources[resourceTypeEnumId][]" from-field="resourceValue"/> </else> </if-empty> </iterate> <field-to-result field="themeResources"/> </simple-method>
相关文章推荐
- OFBIZ 网站或店铺视觉主题(visual Theme)设计
- 转 OFBIZ 网站或店铺视觉主题(visual Theme)设计
- 转 OFBIZ 网站或店铺视觉主题(visual Theme)设计
- ofbiz 网站或店铺视觉主题(visual Theme)设计
- 转 OFBIZ 网站或店铺视觉主题(visual Theme)设计
- OFBIZ 网站或店铺视觉主题(visual Theme)设计
- web设计:网站主题与视觉隐喻
- 移动网站设计的视觉体验
- 读书笔记之网站主题与设计表现
- 网站设计欣赏:45+靓丽的蓝绿色主题网站作品【上篇】
- Pinterest联合创始人Evan Sharp:视觉网站标配“网格布局”的设计过程
- 网站设计的思考——定位网站主题和名称
- 视觉灵感:30个漂亮的的网站设计
- 网站设计的思考——定位网站主题和名称
- 视觉冲击!12个精美绝伦的扁平化网站设计
- 网站设计的思考——定位网站主题和名称
- 网站设计理念 >> 形成视觉冲击的几种方式
- 网站交互设计中的视觉结构
- 网站设计的思考——定位网站主题和名称
- 网站设计中“线”的视觉构成