0

After reading the following post Magento 2: How can I add External URL in top menu

I was hoping to do something similiar .

We have a category attribute and want to display categories depending on a users logged in state. I was hoping that each of the children elements would have a canShow() function or similiar but it doesn't seem the case.

I don't really want to wrap around or replace the _getHtml function, but I don't see clean way of doing it.

Thanks in advance

encodes
  • 135
  • 8

1 Answers1

0

I have a potential solution. I'm going to do a afterGetChildren()

inside that function i'm going to loop through the children and delete them from the tree based upon the attribute.

encodes
  • 135
  • 8