Magento2 Hiding static-block in checkout pagesHow can i rewrite TierPrice Block in Magento2Add a static block to specific pagesmagento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?How to display layout for static block pages for magento1.9.1?Creating static block by custom module magento2Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsHow to make checkout a static block / have identifier like static blocks or pages?
How much maintenance time did it take to make an F4U Corsair ready for another flight?
Boss wants me to ignore a software license
Took GRE two times, same scores with minor differences - worth sending both?
If clocks themselves are based on light signals, wouldn't we expect the measured speed of light to always be the same constant?
These were just lying around
Is this curved text blend possible in Illustrator?
Word for an event that will likely never happen again
A Non Math Puzzle. What is the middle number?
Should I not go forward with internship interview process if I don't have the time to prepare properly?
Is there a Morita cocycle for the mapping class group Mod(g,n) when n > 1?
Can a PC use the Levitate spell to avoid movement speed reduction from exhaustion?
How can I decide if my homebrew item should require attunement?
Heating Margarine in Pan = loss of calories?
What is this "Table of astronomy" about?
A continuous water "planet" ring around a star
How many people would you need to pull a whale over cobblestone streets?
Loading military units into ships optimally, using backtracking
If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?
Are differences between uniformly distributed numbers uniformly distributed?
How does "Te vas a cansar" mean "You're going to get tired"?
Bitcoin successfully deducted on sender wallet but did not reach receiver wallet
Is 悪いところを見つかった proper Japanese?
When does Tiana, Ship's Caretaker check card type?
Simplification of numbers
Magento2 Hiding static-block in checkout pages
How can i rewrite TierPrice Block in Magento2Add a static block to specific pagesmagento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?How to display layout for static block pages for magento1.9.1?Creating static block by custom module magento2Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsHow to make checkout a static block / have identifier like static blocks or pages?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I edited this file [vendor]/[theme name]/Magento_Checkout/layout/checkout_index_index.xml
and use this code to hide the static block:
<referenceContainer>
<block name="custom.block.header" remove="true"/>
</referenceContainer>
The error output was something along the lines :
Element with ID'custom.block.header' already exists
What am I doing wrong here?
this is the full code
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="logo" destination="porto_header" />
<referenceBlock name="custom.block.header" remove="true"/>
</body>
</page>
magento2 static-block
add a comment |
I edited this file [vendor]/[theme name]/Magento_Checkout/layout/checkout_index_index.xml
and use this code to hide the static block:
<referenceContainer>
<block name="custom.block.header" remove="true"/>
</referenceContainer>
The error output was something along the lines :
Element with ID'custom.block.header' already exists
What am I doing wrong here?
this is the full code
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="logo" destination="porto_header" />
<referenceBlock name="custom.block.header" remove="true"/>
</body>
</page>
magento2 static-block
Please share your xml file full code
– Rakesh Jesadiya
Oct 17 '16 at 7:15
add a comment |
I edited this file [vendor]/[theme name]/Magento_Checkout/layout/checkout_index_index.xml
and use this code to hide the static block:
<referenceContainer>
<block name="custom.block.header" remove="true"/>
</referenceContainer>
The error output was something along the lines :
Element with ID'custom.block.header' already exists
What am I doing wrong here?
this is the full code
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="logo" destination="porto_header" />
<referenceBlock name="custom.block.header" remove="true"/>
</body>
</page>
magento2 static-block
I edited this file [vendor]/[theme name]/Magento_Checkout/layout/checkout_index_index.xml
and use this code to hide the static block:
<referenceContainer>
<block name="custom.block.header" remove="true"/>
</referenceContainer>
The error output was something along the lines :
Element with ID'custom.block.header' already exists
What am I doing wrong here?
this is the full code
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="logo" destination="porto_header" />
<referenceBlock name="custom.block.header" remove="true"/>
</body>
</page>
magento2 static-block
magento2 static-block
edited Oct 17 '16 at 7:17
Ree
asked Oct 17 '16 at 5:36
ReeRee
1132 silver badges11 bronze badges
1132 silver badges11 bronze badges
Please share your xml file full code
– Rakesh Jesadiya
Oct 17 '16 at 7:15
add a comment |
Please share your xml file full code
– Rakesh Jesadiya
Oct 17 '16 at 7:15
Please share your xml file full code
– Rakesh Jesadiya
Oct 17 '16 at 7:15
Please share your xml file full code
– Rakesh Jesadiya
Oct 17 '16 at 7:15
add a comment |
1 Answer
1
active
oldest
votes
This is how we remove a block in magento 2
<referenceBlock name="custom.block.header" remove="true"/>
full eg.
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="footer_links" remove="true"/>
</body>
</page>
I would highly suggest, not to make changes in core files, create/extend default theme and make changes there.
I tried this, the error is gone but the block is still there, even after I did cache clearing . I am extending the file i custom theme.
– Ree
Oct 17 '16 at 5:54
what do you want to remove exactly.
– Arun Karnawat
Oct 17 '16 at 5:56
a static-block in checkout page, i extend the file in this path Theme Vendor /Magento_Checkout/layout/checkout_index_index.phtml
– Ree
Oct 17 '16 at 6:01
I think you are doing something wrong there can not be a phtml file in layout folder. it should be /Magento_Checkout/layout/checkout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:04
this is the file you should be making changes to<MagentoRoot>/app/design/frontend/<Vendor>/<ThemeName>/Magento_Checkoutlayoutcheckout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:10
|
show 2 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f141114%2fmagento2-hiding-static-block-in-checkout-pages%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is how we remove a block in magento 2
<referenceBlock name="custom.block.header" remove="true"/>
full eg.
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="footer_links" remove="true"/>
</body>
</page>
I would highly suggest, not to make changes in core files, create/extend default theme and make changes there.
I tried this, the error is gone but the block is still there, even after I did cache clearing . I am extending the file i custom theme.
– Ree
Oct 17 '16 at 5:54
what do you want to remove exactly.
– Arun Karnawat
Oct 17 '16 at 5:56
a static-block in checkout page, i extend the file in this path Theme Vendor /Magento_Checkout/layout/checkout_index_index.phtml
– Ree
Oct 17 '16 at 6:01
I think you are doing something wrong there can not be a phtml file in layout folder. it should be /Magento_Checkout/layout/checkout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:04
this is the file you should be making changes to<MagentoRoot>/app/design/frontend/<Vendor>/<ThemeName>/Magento_Checkoutlayoutcheckout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:10
|
show 2 more comments
This is how we remove a block in magento 2
<referenceBlock name="custom.block.header" remove="true"/>
full eg.
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="footer_links" remove="true"/>
</body>
</page>
I would highly suggest, not to make changes in core files, create/extend default theme and make changes there.
I tried this, the error is gone but the block is still there, even after I did cache clearing . I am extending the file i custom theme.
– Ree
Oct 17 '16 at 5:54
what do you want to remove exactly.
– Arun Karnawat
Oct 17 '16 at 5:56
a static-block in checkout page, i extend the file in this path Theme Vendor /Magento_Checkout/layout/checkout_index_index.phtml
– Ree
Oct 17 '16 at 6:01
I think you are doing something wrong there can not be a phtml file in layout folder. it should be /Magento_Checkout/layout/checkout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:04
this is the file you should be making changes to<MagentoRoot>/app/design/frontend/<Vendor>/<ThemeName>/Magento_Checkoutlayoutcheckout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:10
|
show 2 more comments
This is how we remove a block in magento 2
<referenceBlock name="custom.block.header" remove="true"/>
full eg.
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="footer_links" remove="true"/>
</body>
</page>
I would highly suggest, not to make changes in core files, create/extend default theme and make changes there.
This is how we remove a block in magento 2
<referenceBlock name="custom.block.header" remove="true"/>
full eg.
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="footer_links" remove="true"/>
</body>
</page>
I would highly suggest, not to make changes in core files, create/extend default theme and make changes there.
edited Oct 17 '16 at 5:46
answered Oct 17 '16 at 5:40
Arun KarnawatArun Karnawat
1,4732 gold badges20 silver badges49 bronze badges
1,4732 gold badges20 silver badges49 bronze badges
I tried this, the error is gone but the block is still there, even after I did cache clearing . I am extending the file i custom theme.
– Ree
Oct 17 '16 at 5:54
what do you want to remove exactly.
– Arun Karnawat
Oct 17 '16 at 5:56
a static-block in checkout page, i extend the file in this path Theme Vendor /Magento_Checkout/layout/checkout_index_index.phtml
– Ree
Oct 17 '16 at 6:01
I think you are doing something wrong there can not be a phtml file in layout folder. it should be /Magento_Checkout/layout/checkout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:04
this is the file you should be making changes to<MagentoRoot>/app/design/frontend/<Vendor>/<ThemeName>/Magento_Checkoutlayoutcheckout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:10
|
show 2 more comments
I tried this, the error is gone but the block is still there, even after I did cache clearing . I am extending the file i custom theme.
– Ree
Oct 17 '16 at 5:54
what do you want to remove exactly.
– Arun Karnawat
Oct 17 '16 at 5:56
a static-block in checkout page, i extend the file in this path Theme Vendor /Magento_Checkout/layout/checkout_index_index.phtml
– Ree
Oct 17 '16 at 6:01
I think you are doing something wrong there can not be a phtml file in layout folder. it should be /Magento_Checkout/layout/checkout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:04
this is the file you should be making changes to<MagentoRoot>/app/design/frontend/<Vendor>/<ThemeName>/Magento_Checkoutlayoutcheckout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:10
I tried this, the error is gone but the block is still there, even after I did cache clearing . I am extending the file i custom theme.
– Ree
Oct 17 '16 at 5:54
I tried this, the error is gone but the block is still there, even after I did cache clearing . I am extending the file i custom theme.
– Ree
Oct 17 '16 at 5:54
what do you want to remove exactly.
– Arun Karnawat
Oct 17 '16 at 5:56
what do you want to remove exactly.
– Arun Karnawat
Oct 17 '16 at 5:56
a static-block in checkout page, i extend the file in this path Theme Vendor /Magento_Checkout/layout/checkout_index_index.phtml
– Ree
Oct 17 '16 at 6:01
a static-block in checkout page, i extend the file in this path Theme Vendor /Magento_Checkout/layout/checkout_index_index.phtml
– Ree
Oct 17 '16 at 6:01
I think you are doing something wrong there can not be a phtml file in layout folder. it should be /Magento_Checkout/layout/checkout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:04
I think you are doing something wrong there can not be a phtml file in layout folder. it should be /Magento_Checkout/layout/checkout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:04
this is the file you should be making changes to
<MagentoRoot>/app/design/frontend/<Vendor>/<ThemeName>/Magento_Checkoutlayoutcheckout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:10
this is the file you should be making changes to
<MagentoRoot>/app/design/frontend/<Vendor>/<ThemeName>/Magento_Checkoutlayoutcheckout_index_index.xml
– Arun Karnawat
Oct 17 '16 at 6:10
|
show 2 more comments
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f141114%2fmagento2-hiding-static-block-in-checkout-pages%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please share your xml file full code
– Rakesh Jesadiya
Oct 17 '16 at 7:15