0

How can I make a footer link show only a specific store language view?

For example, I want to show this custom footer link only for English store view, not other language store view. So I can setup different footer links for each store view.

Magento_Theme/layout/default.xml

<referenceBlock name="footer_links">
    <block class="Magento\Framework\View\Element\Html\Link\Current" name="custom-link-1">
        <arguments>
            <argument name="label" xsi:type="string">My new footer title</argument>
            <argument name="path" xsi:type="string">path-link</argument>
        </arguments>
    </block>
</referenceBlock>

1 Answer 1

1

My solution is remove the footer_links and add a footer block in footer according to store wise from admin like below.

In /app/design/frontend/vendor/theme/Magento_Theme/layout/default.xml, add codes:

<referenceBlock name="footer_links" remove="true"/>
<referenceContainer name="footer">
    <block class="Magento\Cms\Block\Block" name="footer_block">
        <arguments>
            <argument name="block_id" xsi:type="string">footer_block</argument>
        </arguments>
    </block>
</referenceContainer>

Now create static blocks from admin as per different store view. like - https://prnt.sc/1g2bsmm

Add different links html in above static blocks as per you want to show in footer(according to store view).

Like above code you need to manage store wise footer links.

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.