Magento – Why is the content showing in the footer links on the page different then what the admin content block shows

footerfooter-linksmagento-2.1

I have a theme that I extended from Luma, I have verified that it is extended properly and working well. I am able to override template/layouts just fine.

I am trying to alter the home page footer links. If I go into

vendor/magento/module-theme/view/frontend/layout/default.xml

I can see the following code for the footer_links.

<referenceContainer name="footer-container">
    <container name="footer" as="footer" label="Page Footer" htmlTag="div" htmlClass="footer content">
        <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" template="switch/stores.phtml"/>
        <block class="Magento\Framework\View\Element\Html\Links" name="footer_links">
            <arguments>
                <argument name="css_class" xsi:type="string">footer links</argument>
            </arguments>
        </block>
        <block class="Magento\Theme\Block\Html\Footer" name="copyright" template="html/copyright.phtml"/>
        <block class="Magento\Framework\View\Element\Template" name="report.bugs" template="Magento_Theme::html/bugreport.phtml" />
    </container>
</referenceContainer>

When I go to the home page I see the following links.

Links on Page view

However, when I go into the admin backend at Content -> Elements -> Blocks, and edit the block with an id of footer_links_block, I get the following content in the editor.

<ul class="footer links">
    <li class="nav item"><a href="{{store url="about-us"}}">About us</a></li>
    <li class="nav item"><a href="{{store url="customer-service"}}">Customer Service</a></li>
</ul>

UPDATE

To add to my question, inside my file at app/design/frontend/vendor/default I have altered the layout with the following code.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/image.jpg</argument>
            </arguments>
        </referenceBlock>

        <referenceContainer name="footer">
            <referenceBlock name="store_switcher" remove="true"/>
            <referenceBlock name="copyright" remove="true"/>
            <referenceBlock name="report.bugs" remove="true"/>
        </referenceContainer>
    </body>
</page>

So I have removed everything in the footer except for the subscribe and the links.

enter image description here

However, the links here are coming from the code. I want to make this editable from the admin side instead. Do I just need to scrap the whole footer and make a custom one? Or is there a way to go to the backend now and edit this?

Best Answer

The magento layout system (and any other xml configuration system) is pretty powerful but it may look intimidating at first.
The idea is that all the xml layout files with the same name are merged into one big xml before processing and rendering.
The upside of this is that you can add stuff to a page without having to alter a core module.
The downside is...what you have now. It's not that easy to find what is where.
In this case the block Magento\Framework\View\Element\Html\Links is just a container that can be altered from different layout files.
It just holds a collection of links and displays them in the page.
It does not care what links it holds.
Look in all the layout files for the text referenceBlock name="footer_links" where footer_links is the name of the block.
What you find, it alters the block content.
You will find the contact link in the contact module, advanced search link in the search module and so on.
To generalize... when you need to change the behavior of a block search in the layout files for referenceBlock name="name of the block here" to see what else alters is.

[Edit]

The name of the blocks in the layout file have nothing to do with the names of the static blocks you add in the admin panel.
The names of the blocks from the layout files are used just to know how to reference them in other layout files.
The names (identifiers) of the static blocks you add/edit in the admin are used for retrieving them when needed.