magento布局介绍IntrotoLayouts

magento布局介绍IntrotoLayouts

ID:40559642

大小:82.00 KB

页数:9页

时间:2019-08-04

magento布局介绍IntrotoLayouts_第1页
magento布局介绍IntrotoLayouts_第2页
magento布局介绍IntrotoLayouts_第3页
magento布局介绍IntrotoLayouts_第4页
magento布局介绍IntrotoLayouts_第5页
资源描述:

《magento布局介绍IntrotoLayouts》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、布局介绍IntrotoLayouts星期二,08/19/2008-22:22—foolsky布局介绍Layouts布局Layout,就像它的的组件一样,很容易误导你以为要用好它就要先学习好编程逻辑。事实上,布局只是一些XML标签组成的。它很容易学习。学习一些关于布局的基本概念和命令之后,你会很自信的按你的意愿修改和设计你自己的网店布局·布局是如何工作的HowLayoutWorks·解剖布局AnatomyofLayout·XML规则RulesofXML·入门联系QuickExercisestoGetYouS

2、tarted 布局是如何工作的HowLayoutWorksLayout布局是magento应用的一些虚拟组件。你可以通过修改这些布局组件来达到建设网店页面的目的。Diagram1 布局包含默认布局defaultlayout和升级布局layoutupdates两种,他们都是由很容易学习的XML标签构成的。通过这些布局命令,你可以修改/分配内容区块,结构区块的关系,也可以控制网店前台的功能性。比如加载或者卸载特定的区块JAVASCRIPTS到一个特定页面。布局文件是基于每个模块单独存放的。每个模块都有自己的布

3、局文件。(比如'catalog.xml'是catalogmodule的布局文件,...etc).这些布局文件位于app/design/frontend/your_interface/your_theme/layout/andeachfileisfurtherseparatedbyhandles(seediagram1),eachhandle(withtheexceptionof)assigningitsnestedupdatestotheaccordingspecificpageinth

4、estore.Somelayoutfilesmaycontainthehandle.Whenparsingthelayoutfiles,Magentofirstgrabsthelayoutupdatesassignedinthehandleofalmostalllayoutfiles,readingthemintheorderasassignedinapp/etc/modules/Mage_All.xml.Itthenparsesthepage-specificlayo

5、utupdate,finalizingthebuildingofastorepage.Thesystemisbuiltthiswayinordertoallowseamlessadditionandremovalofmoduleswithouteffectingothermodulesinthesystem.BacktoTopAnatomyofLayoutLayoutcontainasmallsetofXMLtagsthatactasdetailedinstructionstotheapplication

6、onhowtobuildapage,whattobuilditwithandthebehaviorofeachbuildingblock.Thebestwaytoapproachlayoutistojustdiverightinandattackitfromallangles.Inorderforyoutodothat,here’resomebehavioralpropertiesofeachlayoutXMLtag.HandleHandle(diagram1)isanidentifierbywhicht

7、heapplicationdetermineswhattodowiththeupdatesnestedbyit.Ifthenameofthehandleis,thentheapplicationknowsthatitsnestedupdatesmustbeloadedonalmostallthepagesofthestorepriortoloadingpage-specificlayout(Wesay'almostall',becausesomeexceptionalpagesliket

8、heproductimagepopupdoesnotloadthelayoutinthehandle).IfMagentofindshandlesotherthan,itwillassigntheupdatesnestedinsidethehandletotheaccordingpagespecifiedbythehandle.Forinstance,

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。