magento设计人员中文手册

基本概念


website(站点)和store(商店)
magento中的website和store是泛指的概念。website被认为是一组store的集合,而store则是一组store view(商店视图)的集合。这两个概念的定义甚至可以根据需要来定义。

interface(界面)
magento中的interface是一组theme的集合。一个interface可以被应用到整个website也可以应用到某个
特定的store。如果interface被应用到了website,那么该website下的所有store都将使用同一风格的interface,如果是被应用到store,那么这个store就采用它自己的store,也就是说store的设置覆盖掉website的设置。


theme(主题)

magento中的theme是指layout(布局),template(模板),locale(区域语言)和skin(皮肤)文件的总和。magento一次可以载入多个theme,所以主题就分成两大类default(默认) theme和non-default(非默认) theme。

Default theme
每一个interface都会包含有一个default theme。当你指定站点(website)或商店(store)使用某个interface时,这个interface的default theme会被自动加载。如果你需要修改设计,你可以直接修改default theme,也可以创建一个non-default theme,并在这个新建的non-default theme中做你需要做的修改。之所以这样做你的修改会生效是因为magento可以同时加载多个theme,而且default theme总是具有最低的优先级。也正因为如此,default theme需要包含所有的必须的layout,templates和skins文件,而non-default theme则只需要包含我们需要修改的文件,当然也可以包含所有的相关文件。

Non-default theme
non-default theme可以包含任意多的文件,也可以只包含我们所需要的那一点文件,因为default theme会提供fallback给其它的所有需要的文件。通常non-default theme是提供季节性的或促销性的主题,一般只是修改一些CSS文件,或者替换掉一些图片什么的。


Layout
保存在app/design/frontend/your_interface/your_theme/layout/目录中,是一组XML文件,用来定义各个页面的block结构和META信息。

Templates
保存在app/design/frontend/your_interface/your_theme/template/目录中,是一组phtml文件,包含普通的xhtml代码和php代码。

Locale
保存在app/design/frontend/your_interface/your_theme/locale/目录中的一组文档,用来提供翻译信息。

Skins
保存在skin/frontend/your_interface/your_theme/目录中的js,css,image文件



Blocks
magento是以block为单位来提供功能的。分成以下两在类型:
结构block
这种block主要是用于指定可视的页面结构到页面。比如页面顶部,左边栏目,底部,
它本身不包含内容,事实上则是一个内容容器。通过这样一个个结构block组成了一个页面。



内容block
这种block用来向结构block输出真实的内容。事实上就是页面上提供的各种功能,比如搜索框,
目录列表,迷你购物车,产品标签...


magento正是通过结构block(结合layout)编排好页面,然后通过内容block输(结合layout)出内容。

有了上面的基本概念的初步认识,我们下面通过实例来加深学习。

为新interface创建一个default theme

Directory 1: app/design/frontend/default/default/ — This directory contains the layout, translation (locale) and template materials.
Directory 2: skin/frontend/default/default/ — This directory contains the images, CSS and block-specific Javascripts.

分别从上面的两个目录复制到下面这两个目录

Directory 1: app/design/frontend/new_interface/default/
Directory 2: skin/frontend/new_interface/default/
注:new_interface为新interface名称,default是default theme的名称
这样就相当于创建了一个新的new_interface interface,并且为它创建了一个default theme..

创建一个non-default theme

在创建一个non-default theme,我们不需要复制整个default theme的文件目录(当然你要是这么做也是可以的),我们只需要将我们要修改的文件复制过来,并在此基础上做修改。有一点需要注意的是,在复制文件时,不仅要复制文件本身,还要让文件在新的theme中和在default theme中有一样的目录结构,也就是
它的父目录一直上溯到theme这层要保持一致。比如你要修改的是:app/design/frontend/default/default/template/catalog/home.phtml那么你需要创建一个这样的文件app/design/frontend/your_interface/your_non_default_theme/template/catalog/home.phtml

 

(待续...)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
一章:Magento介绍...................................................................................................................4 Magento 的特色......................................................................................................................5 什么是Magento........................................................................................................................6 Magento的元素和专业术语....................................................................................................6 网站和商店(website and store)...................................................................................7 网站(website)..............................................................................................................7 商店(store)..................................................................................................................7 商店界面(store views)................................................................................................7 Magento的程序架构................................................................................................................8 内核(Core)..................................................................................................................9 本地的(Local).............................................................................................................9 社区(Community).......................................................................................................9 扩展(Extensions).........................................................................................................9 模块(Modules)............................................................................................................9 界面(Interface)..........................................................................................................10 主题(Themes)............................................................................................................10 区块(Blocks).............................................................................................................11 第二章:Magento入门.................................................................................................................12 Magento的系统需求..............................................................................................................12 Magento下载..........................................................................................................................13 Magento安装和配置..............................................................................................................14 Magento后台控制面板介绍..................................................................................................14 创建多网站和商店(Creating Multiple Websites and Stores)...................................14 缓存管理(Cache Management).................................................................................16 第三章:建立目录........................................................................................................................17 产品目录概念总览................................................................................................................17 设置默认项....................................................................................................................17 产品图片存放目录(Product Image Placeholders)....................................................19 创建分类(Creating Categories).................................................................................21 分类添加产品(Assigning products at the category level)....................................24 定制分类页面的外观(Assigning designs at the category level)..............................25 在分类页面使用静态区块(Using static blocks with categories).........................26 属性(Attributes)................................................................................................................27 创建属性(Creating an Attribute)...............................................................................27 特性(Properties)........................................................................................................27 管理标记/选项(Manage Label/Options)...................................................................30 管理属性集(Managing Attribute Sets).....................................................................31 产品(Procucts)..................................................................................................................34

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值