I am trying to add custom top link via custom module.
File /app/code/<VendorName>/Inquiry/view/frontend/layout/default.xml
If I used <referenceBlock name="header.links">
then its working fine.
<body>
<referenceBlock name="header.links">
<block class="Magento\Framework\View\Element\Html\Link" name="inquiry.link" before="-">
<arguments>
<argument name="label" xsi:type="string" translate="false">Inquiry</argument>
<argument name="path" xsi:type="string" translate="false">inquiry</argument>
</arguments>
</block>
</referenceBlock>
</body>
But, If I used <referenceBlock name="top.links">
then it is not working.
<body>
<referenceBlock name="top.links">
<block class="Magento\Framework\View\Element\Html\Link" name="inquiry.link" before="-">
<arguments>
<argument name="label" xsi:type="string" translate="false">Inquiry</argument>
<argument name="path" xsi:type="string" translate="false">inquiry</argument>
</arguments>
</block>
</referenceBlock>
</body>
Can anyone guide me here, what is going wrong with second code? Because in Google search result everywhere peoples has suggested <referenceBlock name="top.links">
but it is not working in my custom module. As well same code is written in magento 2 core module. I stuck here..
header.links
but nottop.links
top.links
. file:\vendor\magento\module-customer\view\frontend\layout\default.xml
<move element="register-link" destination="header.links"/>
in Luma Theme so it move toheader.links