0

I have created a new theme from scratch (so it doesn't inherit any themes). I have added my custom css, moved some blocks, removed some blocks without any difficulties.

But I have one problem, there is content below my footer which I was not able to remove, I couldn't find which block was causing this problem. It shows in every single page, I found that if I remove the block "content" then it's removed but the content above the footer is obviously deleted too.

Here is an image showing the content I'm trying to remove content below footer

I'm not totally sure if I should remove it or hide it with some javascript and make it shows at a particular moment.

I activated the template hints and it didn't help at all, it doesn't display any templates on the part I want to remove.

EDIT The only third party module I have installed is Mollie for payment.

Here is my Theme_dir/Magento_Theme/layout/default.xml code

<?xml version="1.0"?>
<page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="header.container" destination="header.panel.navbar"/>
        <move element="page.top" destination="header.panel.menu.navbar"/>
        <move element="logo" destination="header.panel.navbar" before="header.panel"/>
        <move element="top.search" destination="header.panel.navbar" before="header.panel"/>
        <move element="authorization-link" destination="header.panel.justify" before="store_language"/>
        <move element="minicart" destination="header.panel.justify" after="store_language"/>
        <move element="catalog.topnav" destination="header.panel.menu.navbar" after="-"/>
        <move element="footer-container" destination="main.content" after="content"/>
        <referenceBlock name="advanced-search-link" remove="true"/>
        <referenceBlock name="top.links" remove="true"/>
        <referenceBlock name="absolute_footer" remove="true"/>
        <referenceBlock name="frontend-storage-manager" remove="true"/>
        <referenceBlock name="store.menu" remove="true"/>
        <referenceBlock name="store.links" remove="true"/>
        <referenceBlock name="store.settings" remove="true"/>
        <referenceBlock name="checkout.root" remove="true"/>
        <container name="header.container.panel.nav" htmlTag="header" before="main.content">
            <container name="header.panel.nav" htmlClass="bg-white fixed-top" htmlTag="nav" before="-">
                <container name="header.panel.navbar" htmlClass="navbar navbar-expand-md" htmlTag="div" before="-">
                    <container name="header.panel" label="Page Header Panel" htmlTag="div" htmlClass="col-md-3 col-7" after="top.search">
                        <container name="header.panel.justify" label="Page Header Panel Justify" htmlTag="div" htmlClass="d-flex justify-content-end left-nav-mobile">
                            <referenceBlock name="skip_to_content" remove="true"/>
                            <block class="Magento\Store\Block\Switcher" name="store_language" as="store_language" template="Magento_Store::switch/languages.phtml">
                                <arguments>
                                    <argument name="view_model" xsi:type="object">Magento\Store\ViewModel\SwitcherUrlProvider</argument>
                                </arguments>
                            </block>
                            <block class="Magento\Customer\Block\Account\Navigation" name="top.links">
                                <arguments>
                                    <argument name="css_class" xsi:type="string">header links</argument>
                                </arguments>
                            </block>
                        </container>
                    </container>
                </container>
                <container name="header.panel.menu.navbar" htmlClass="navbar menu navbar-expand-md" htmlTag="div" after="-">

                </container>
            </container>
        </container>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/logo-header.png</argument>
            </arguments>
        </referenceBlock>
        <container name="main.content" htmlTag="main" after="header.container.panel.nav">
            <referenceBlock name="content"/>
            <referenceBlock name="footer-container"/>
        </container>
    </body>
</page>

So if I add

<referenceBlock name="content" remove="true"/>

The block below my footer I want to delete is removed but the content above the footer is removed too.

2
  • This is apparently a form used to log in during checkout. Have you installed any third-party Checkout module? Can you show us how is your .xml file that you used to add / remove the blocks you mentioned? Commented Apr 16, 2020 at 10:22
  • @RoneClayBrasil thank you for your answer, I just edited my post. Commented Apr 17, 2020 at 8:25

1 Answer 1

1

I found the solution, I thought this was not a template since with template_hints enabled no path were displayed in the block I wanted to remove, I made a search in all the modules to find where it could come from, I searched for each div class I found.

I found that the template "authentication-popup.phtml" had the classes I was looking for so I searched which block added the template to the content.

I found

<referenceContainer name="content">
            <block class="Magento\Customer\Block\Account\AuthenticationPopup" name="authentication-popup" as="authentication-popup" template="Magento_Customer::account/authentication-popup.phtml">
            //Some arguments here
            </block>
</referenceContainer>

So I simply added

<referenceBlock name="authentication-popup" remove="true"/>

in Vendor/theme/Magento_Theme/layout/default.xml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.