AI OnAI Off
Use Get descendants instead? Then you can filter that on access rights, visible in menu etc...?
Can't see anything obviously wrong. Do you have the contents of that recursive function? What does it actually return? Errors?
I actually figured out what I've been doing wrong. I'm not precisely sure how to fix it but my logic in this snippet is working perfectly. It only gets added to the menu if its parent is part of the menu structure. If the parent is not part of the structure, neither is the child. In retrospect the problem was with my logic, not with the code itself.
Hi, I'm trying to figure out why the bollowing snippet isn't behaving as expected. It should iterate through all content and child content, find any content that is marked "VisibleInMenu" and then add them to a list.
Any help would be much appreciated. Thanks.