0

I'm trying to change the top links "Compare Products My Account Create an Account Sign In". This a child theme. I've attempted to change both the default.xml and layout.xml in my layout directory. Nothing works.

Shouldn't I be able to do this through admin?

this is 2.0.13 running locally on a mac

1 Answer 1

0

You aren't able to do this in the admin, but you weren't able to do this in the admin in m1 either.

But you are on the right track, but the way you need to do this is in the default.xml of the theme module. Create a file here:

app/design/frontend/{vendor_namespace}/{theme_name}/Magento_Theme/layout/default.xml

And include this code:

<referenceBlock name="top.links">
    <block class="Magento\Framework\View\Element\Html\Link\Current" name="gag-my-quote" after="-">
        <arguments>
            <argument name="label" xsi:type="string">Your Custom Link</argument>
            <argument name="path" xsi:type="string">your/custom/link</argument>
        </arguments>
    </block>
</referenceBlock>

It is possible to add in a block into the header that calls a cms block (for future ease of use), it's not that hard to do and can be done in this same file, if you want help setting that up, let me know.

3
  • Hm, I tried that and still get no changes. Flushed my cache.
    – user52301
    Commented Mar 28, 2017 at 3:33
  • I'm using blank as the parent, not sure if that makes a difference.
    – user52301
    Commented Mar 28, 2017 at 6:05
  • I might be confused, but i thought you were using a custom theme based on Luma, is that the case? For the .xml file that you are using, can you get anything to work? As in, can you add anything in or can you use a remove statement to get anything to remove? I'm thinking that your issue might be the file location or the naming of the file. You shouldn't need to clean cache when making an xml edit. Also, take a look here, this has tripped me up a bunch: magento.stackexchange.com/questions/134523/…
    – circlesix
    Commented Mar 28, 2017 at 14:50

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.