cancel
Showing results for 
Search instead for 
Did you mean: 

Remove cms_footer_links_container

SOLVED

Remove cms_footer_links_container

As far as I can tell `cms_footer_links_container` merely exists for a unit test and is safe to remove. At least, I cannot discover any magic that something gets inserted there.

 

% find . -type f -exec grep -l 'cms_footer_links' {} + 2>/dev/null
./vendor/magento/module-cms/view/frontend/layout/default.xml
./vendor/magento/module-widget/Test/Unit/Block/Adminhtml/Widget/Instance/Edit/Chooser/ContainerTest.php

Is my assumption correct or am I missing something?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Remove cms_footer_links_container

So far I've concluded that nothing is placed in that container by Magento. Maybe at a future release, Magento will support a checkbox in the admin that says "add to footer menu" for a CMS page, but that hasn't happened yet.

View solution in original post

4 REPLIES 4

Re: Remove cms_footer_links_container

Container cms_footer_links_container is mainly used by widgets (for layout updates container) 
Also some third-party modules uses it for custom links on footer eg.blog etc. 
Best solution would be to remove all the blocks  (links) inside it. Not the container it self. As some xml blocks would refer to it. 
something like this: 

        <referenceBlock name="privacy-policy-link" remove="true"/>
        <referenceBlock name="search-term-popular-link" remove="true"/>
        <referenceBlock name="contact-us-link" remove="true"/>
        <referenceBlock name="sales-guest-form-link" remove="true"/>
        <referenceBlock name="catalog-search-advanced-link" remove="true"/>

Re: Remove cms_footer_links_container

Thanks for your answer, but those aren't the same containers:

<referenceContainer name="footer">
            <container name="cms_footer_links_container" label="CMS Footer Links" htmlTag="div" htmlClass="links" before="footer_links" />
</referenceContainer>

The blocks you mention are in the container referenced here as "footer_links". Magento CMS module injects a container for CMS pages I guess, but there's no way from the Magento backend that I can see to inject them into that container using a graphical interface.

 

Of course a layout update will do it, so either it's something for backwards compatibility or an easy way for someone familiar with layout updates to inject pages to the footer menu.

Re: Remove cms_footer_links_container

Hello,

 

Magento 2 contain that container into Magento_Cms module

 

https://github.com/magento/magento2/blob/6ce74b2/app/code/Magento/Cms/view/frontend/layout/default.x...

 

Hope it will help you, if it will help you then mark as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Remove cms_footer_links_container

So far I've concluded that nothing is placed in that container by Magento. Maybe at a future release, Magento will support a checkbox in the admin that says "add to footer menu" for a CMS page, but that hasn't happened yet.