Zencart模板结构和设计详解[通俗易懂]

Zencart模板结构和设计详解[通俗易懂]Zen Cart 的设计很简单 和其他 HTML 页面是一样的 只是整个页面分成了几个部分 并加入了 PHP 代码 通常分为页眉 header 页脚 footer 边框 sideboxes 页面通过 CSS 样式表来控制 样式表控制了包括表格单的背景图案 字体颜色和样 式等等 所以假如你需要修改边框标题栏的字体 那么就去查看样式表文件 Zen Cart 在页面添加图像有两种方式

Zen Cart的设计很简单,和其他HTML页面是一样的。只是整个页面分成了几个部分,并加入了PHP代码。
通常分为页眉 (header),页脚(footer),边框(sideboxes)。页面通过CSS样式表来控制,样式表控制了包括表格单元的背景图案、字体颜色和样 式等等,所以假如你需要修改边框标题栏的字体,那么就去查看样式表文件。
Zen Cart在页面添加图像有两种方式。可以使用图像目录的相对路径,或者在模板中用php变量定义图像。如果你使用https服务器,并且采用相对图像路 径,那么https的图像目录下也要有同样的图像,否则https服务器很可能会给出警告提示。
Zen Cart可以设置成任意的html/flash的界面,只是比通常的html页面的设计费时。你可以从修改缺省的模板开始,先修改CSS文件和三栏格式的 界面。开始先采用不同的颜色,很快就可以设计出完全不同的风格。

zen cart各部分页面相对应模板文件列表:

文件路径 注释
index.php 主文件
includes/templates/[custom template folder]/common/html_header.php 页面的head部分
includes/templates/[custom template folder]/common/tpl_main_page.php 页面的body部分
includes/templates/[custom template folder]/common/tpl_header.php 所有页面的页眉
(column left)
includes/templates/[custom template folder]/common/main_template_vars.php 决定页面的内容部分,缺省为 ‘tmp_index_default.php’
首页 – 缺省
includes/templates/[custom template folder]/templates/tmp_index_default.php 首页模板文件
首页 – 显示分类
includes/templates/[custom template folder]/templates/tpl_index_categories.php 首页上显示分类时的模板文件
includes/modules/[custom template folder]/pages/index/category_row.php 选择要显示的分类
includes/templates/[custom template folder]/templates/tpl_index_category_row.php 显示分类
首页 – 显示指定分类
includes/templates/[custom template folder]/templates/tpl_index_product_list.php 首页上显示指定的分类时采用的模板文件
includes/modules/[custom template folder]/product_listing.php 将商品数据添加到数组
includes/templates/[custom template folder]/templates/tpl_modules_product_listing.php 显示商品数量和商品导航菜单
includes/templates/[custom template folder]/common/tpl_list_box_content.php 显示商品数组
商品信息页面
includes/templates/[custom template folder]/templates/tpl_product_info_display.php 显示单件商品信息
购物车 页面
includes/templates/[custom template folder]/templates/tpl_shopping_cart_default.php 购物车页面
(column right)
includes/templates/[custom template folder]/common/tpl_footer.php 所有页面的页脚

编程小号
上一篇 2025-02-19 07:33
下一篇 2025-02-23 08:40

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/141095.html