magento目录结构说明,Magento文件夹结构说明,Magento folder structure

/app – 程序根目录

 

 /app/etc – 全局配置文件目录

 

 /app/code – 所有模块安装其模型和控制器的目录

 

 /app/code/core – 核心代码或经过认证得模块,如果要升级不要这里的代码

 

 /app/code/community – 社区版的模块目录

 

 /app/code/local – 定制代码目录

 

 /app/code/core/Mage? – magento默认命名空间

 

 /app/code/core/Mage?/{Module} – 模块根目录

 

 /app/code/core/Mage?/{Module}/etc – 模块的配置文件目录

 

 /app/code/core/Mage?/{Module}/controllers – 模块的控制器

 

 /app/code/core/Mage?/{Module}/Block? – 显示块的逻辑类

 

 /app/code/core/Mage?/{Module}/Model? – 模块的对象模型

 

 /app/code/core/Mage?/{Module}/Model/Mysql4? – 模块的资源模型

 

 /app/code/core/Mage?/{Module}/sql – 模块各个版本的安装和升级用sql

 

 /app/code/core/Mage?/{Module}/sql/{resource}/- 升级是需要的资源模型

 

 /app/code/core/Mage?/{Module}/sql/{resource}/{type}-{action}-{versions}.(sql|php) – 资源升级文件 例如: mysql4-upgrade-0.6.23-0.6.25.sql

 

 /app/design – 设计包目录 (layouts, templates, translations)

 

 /app/design/frontend – 前端的设计

 

 /app/design/adminhtml – 后台管理设计

 

 /app/design/{area}/{package}/{theme} – 定制的主题

 

 /app/design/{area}/{package}/{theme}/layout – 定义显示块的 .xml 文件

 

 /app/design/{area}/{package}/{theme}/template – .phtml (html with php tags)模版

 

 /app/design/{area}/{package}/{theme}/locale – Zend_Translate 兼容的主题用的文字翻译

 

 /app/locale – 本地化文件

 

 /app/locale/{locale (en_US)} – Zend_Translate 兼容的模块用的文字翻译

 

 /skin/{area}/{package}/{theme}/- css和图像

 

 /lib – 公用库

 

 /js – javascripts

 

 /media – 上传文件存放目录

 

 /tests – 测试目录

 

 /var – 临时文件目录

 

控制器的开发使用说明
模块通过控制器来提供接口,控制器对于一个模块来说并不是必需的比如 察看订单的url是 http://xxx.xxx.xxx.xxx/sales/order/view/order_id/77/其中这个sales是入口的名称(frontName),order是控制器的名字,view是action名(控制器类中的方法名),order_id参数名,77参数值对应的配置文件

复制代码
1 <routers>
2   <sales>
3     <use>standard</use>
4     <args>
5       <module>Mage_Sales</module>
6       <frontName>sales</frontName>
7     </args>
8   </sales>
9 </routers>
复制代码
--------都是凡人,何必装神-------
 
http://www.cnblogs.com/hzh-blog/archive/2011/08/31/magento_structure.html
 

Here’s short overviewwhere the application resides

/ app / etc - is global configuration den

/ app / code - is where modules have installed their models and controllers

/ app / code / core - are core team developed or certified modules

/ app / code / community - are community contributed modules

/ app / code / local - are local customizations

/ app / code / core / Mage - magento default namespace

/ app / code / core / Mage / {Module} - module root

/ app / code / core / Mage / {Module} / etc - module configuration

/ app / code / core / Mage / {Module} / controllers - controllers provided by module

/ app / code / core / Mage / {Module} / Block - Block logic classes

/ app / code / core / Mage / {Module} / Model - Object Models provided by module

/ app / code / core / Mage / {Module} / Model / Mysql4 - Resource Models provided by module

/ app / code / core / Mage / {Module} / sql - sql installation and upgrade files between module versions

/ app / code / core / Mage / {Module} / sql / {resource} / - resource model specific upgrades

/ app / code / core / Mage / {Module} / sql / {resource} / {type}-{action}-{versions}.(sql|php) - resource update files. example: mysql4-upgrade-0.6.23-0.6.25.sql

/ app / design - is location of design packages (layouts, templates, translations)

/ app / design / frontend - frontend design

/ app / design / adminhtml - HTML admin panel design

/ app / design / {area} / {package} / {theme} - theme customizations

/ app / design / {area} / {package} / {theme} / layout - .xml files that define block structure for different cases in website flow

/ app / design / {area} / {package} / {theme} / template - .phtml (html with php tags) templates

/ app / design / {area} / {package} / {theme} / locale - Zend_Translate compatible translation files for package/theme

/ app / locale - locale files

/ app / locale / {locale (en_US)} - Zend_Translate compatible translation files for modules

/ skin / {area} / {package} / {theme} / - is where design package css and images are

/ lib - are libraries such as Zend and Varien

/ js - are javascripts smile

/ media - uploaded files (product images, pdf documents, etc)

/ tests - Unit tests (not done yet)

/ var - temporary files

/ includes - contains config.php

 


参考内容
http://www.magentocommerce.com/wiki/2_-_magento_concepts_and_architecture/magento-folder-structure

你可能感兴趣的:(struct)