0

I'm would like to know if it's possible to hide a navigation link of the Customer Account dashboard depending on a condition.

For example, I would like to display this block only if customer has a specific account:

enter image description here

Is it possible ? Does anyone can help me ?

Thank you for any advice

1 Answer 1

0

The image you posted is how you add a new link. That interface only have 1 method, which is not related to render

So you can go up to one level, check the parent to see how it renders the child blocks. This is the parent block Magento\Customer\Block\Account\Navigation and it has the getLinks method which in the body function, it will get the child blocks (the blocks that you added via layout).

You can start investigating from this method

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.