Magento2 Layout

Layout instructions: 布局说明

Manage layouts:管理布局

在Magentop2.4.2中

若要更改页面结构,请修改page layout 文件;所有其他自定义都在 page configuration or generic layout files.文件中执行。

要在每个页面上更改相同布局,请修改default.xml 文件,例如,添加到app/code/Vendor/Module/view/frontend/layout/default.xml中的布局更改会加载到所有页面上。若要向特定页面添加布局更改,请使用与页面路径对应的布局文件。例如,更改app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml页面被加载到产品详情页面。