I have added the custom tab on the customer dashboard using the code:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer_account_navigation">
<!-- <update handle="customer_account_navigation"/> -->
<block class="Magento\Framework\View\Element\Html\Link\Current" name="demo-link">
<arguments>
<argument name="path" xsi:type="string">addprofile/index</argument>
<argument name="label" xsi:type="string">Demo Link</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>
Now what I want is I want to show this tab to only a particular customer group. As the link was added through the XML file and when I checked the navigation.phtml it is rendering all the links using
<?php echo $block->getChildHtml();?>
So I wasn't able to add some condition there.
can anyone help?
Thanks