- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"/>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Remove cms_footer_links_container
Hello,
Magento 2 contain that container into Magento_Cms module
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content