I'm a Magento dev. I have a problem that luma's default checkout page doesn't show the footer and navigation. I created a custom layout file, I made the footer and header visible, but my category navigation bar was not visible. Can any one help me out? This is my layout file
1 Answer
For Magento 2.4.x, above solution does not work.
Try this:
Edit app/design/frontend///Magento_Checkout/layout/checkout_index_index.xml like this:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="logo" destination="header-wrapper" />
</body>
</page>
Then add the following code in app/design/frontend///Magento_Checkout/page_layout/checkout.xml:
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>
<referenceContainer name="page.wrapper">
<container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content" />
<container name="page.top" as="page_top" label="After Page Header" after="header.container" />
<container name="checkout.header.container" as="checkout_header_container" label="Checkout Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content">
<container name="checkout.header.wrapper" label="Checkout Page Header" as="checkout_header_wrapper" htmlTag="div" htmlClass="header content"/>
</container>
<container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
</referenceContainer>
</layout>
Remove Static Content and Flush Magento Cache.
That's All.
-
Thanks for responding to me. and and I have edited the code according to your instructions. I Edit app/desgin/frontend////Magento_Checkout/layout/checkout_index_index.xml : <page xmlns:xsi="w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <move element="logo" destination="header-wrapper" /> </body> </page> and I add file app/desgin/frontend////Magento_Checkout/page_layout/checkout.xml : but it still doesn't work Commented Apr 23 at 8:45
-