store design to your desired specifications.
The base layout files are found in the directory: app/design/frontend/base/default/layout.
Layout files for a theme should be placed in the directory: app/design/frontend/<your_package>/<your_theme>/layout
A layout is comprised of default layout and layout updates that are made up of easy-to-learn XML tags. With these layout commands, you can modify/assign content block-structural block relationships and also control store-front functionalities such as loading and unloading of block-specific JavaScripts to a page.
Each Magento module has it is own layout file, for instance ”catalog.xml” is a layout file for the catalog module” and “customer.xml” is for the customer module. Each file is further separated into handles. The handles that are available are pre-defined in the Magento core and by any active extensions in your store. For the most part, each handle corresponds to a type of page within your Magento store, such as
<catalog_category_default> and <catalog_product_view>, but there are some handles that apply to all pages, such as the <default> handle, and some that apply within pages based on specific statuses, such as
<customer_logged_in> and <customer_logged_out>.
A handle can occur in multiple layout files and blocks can be assigned to that handle or overridden by each layout file. For example, most layout files may contain the <default> handle. When parsing the layout files, Magento first grabs the layout updates assigned in the <default> handle in each of the layout files, reading them in the order as assigned in app/etc/modules/Ma ge_All .xml . It then parses the page-specific layout handles, again looking in all of the layout files for that handle, and finalizes the building of a store page.
Magento’s rendering system is built this way to allow seamless addition and removal of modules without affecting other modules in the system. This means you can add, remove and move most of Magento’s
functionality by simply adding, removing or moving the block declarations in the layout files.
Không có nhận xét nào:
Đăng nhận xét