Magento 2 – How to Add Page URL Link in Footer

magento2

I am trying to add new link in footer using CMS block and I know how to do that.first create new block in admin then go to your theme's layout->default.xml file and add below code so it will show link in Front end footer section.

<referenceContainer name="footer">
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="Our Store">
            <arguments>
                <argument name="label" xsi:type="string">Our Story</argument>
                <argument name="path" xsi:type="string">Our Story</argument>
            </arguments>
        </block>
    </referenceContainer>

Now I have one problem is that which path I need to assign so when I click on this link it go to my Block's contain.

 <argument name="path" xsi:type="string">Our Story</argument>

on the above code what I need to specify or replace Our Story? so when I click on Our Story I go to this block's contain that I add in admin.right now I am getting 404 page not found.

Best Answer

check the path you gave and the cms page url key is same!

You are getting 404. So your cms page url key is not same as path!

Related Topic