【php精品源码栏目提醒】:网学会员在php精品源码频道为大家收集整理了“ecmall挂件在首页是怎么显示 - 编程语言“提供大家参考,希望对大家有所帮助!
Ecmall 的挂件是怎么显示的常常让人很费解明明看到
源码中首页调用的index.html中什么内容也没有但前台就是一堆的挂件就显示出来了究竟是什么回事呢让我们来揭开ecmall挂件在首页中显示的神秘面纱。
1.挂件widgets 在目录data 的page_config 目录的中 比如首页生成的挂件是 default.index.config.
php 2. 挂件语句解析 return array widgets array _widget_513 //挂件名称 array name best_goods //挂件类型
精品推荐 options NULL config array top_left /挂件放在首页中的位置 array 0 _widget_513 3.调用 adefault.app.
php 中调用 this-displayindex.html 转入index.html 中的 注意这里不是注释掉语句 是会被template.
php 中的 function fetch_strsource if definedIS_BACKEND source this-smarty_prefilter_preCompilesource return preg_replace/n/e this-select1 source 解释为挂件 其格式 page 文件名、 area 显示的位置 解析过程中会进入 bwidgets 调用解析模板文件 c template.
php中调用 function displayfilename cache_id out this-fetchfilename cache_id中调用 function display_widgetsarr / 请求控制器 / controller cc controller-display_widgetsarr frontend.base.
php 文件中 函数 display_widgetsoptions 中 调用 / 获取该页面的挂件配置信息 / widgets get_widget_configthis-_get_template_name page d wedget.base.
php 文件中的函数 get_widget_config 调用 default.index.config.
php 文件 config_file ROOT_PATH . /data/page_config/ . template_name . . . page . .config.
php 这里 template_name 值为default 而 page值为index所以生成 default.index.config.
php文件。
e挂件解析会解析两步: 1. 首先将 解析为 2. 读取以上挂件数组中数据生成网页可识别的标准数据 首页布局样式图 ---content--------------------right--------------------------------- top_left cycle_image sales ------------------------------------------------- top_right ----------------------------------------------------------------- banner ----------content------------------------------------------------- bottom_left area ------------------------------------------------------------------ bottom_down ------------------------------------------------------------------
上一篇:
Smart
下一篇:
基于消费者社会化视角的儿童消费者影响因素研究