How to write a Macro which counting all document's children that have "show in navigation" property set on true?
I've used this in the past and it seems to work.
if(Documents[CurrentDocument.NodeAliasPath].Children.WithAllData.Where("ClassName = 'cms.menuitem' AND DocumentMenuItemHideInNavigation = 0").Count > 0) { true } else { false }
You don't need "WithAllData" in this case
You're correct, I had some other fields in my WHERE condition I removed and should have removed that prior to posting. Good catch!
Please, sign in to be able to submit a new answer.