Let me know if I am wrong BUT:
Everything that is underneath "50" using ultimateparent will have the active class, not just parentparent
Using "IF" it looks like this:
[[if? &is=`[[UltimateParent]]:in:50` &then=`class="active"` &else=``]]
The above code is a modified call that comes from one of my templates, it does basicaly the same as what you want, it adds to all documents "nested or not" underneath ID 50
I think if that doesn't work exactly how you want it, you could do something like the following, a kind of catch-all:
[[if? &is=`[*parent*]:is:50:or:[[UltimateParent]]:in:50` &then=`class="active"` &else=``]]
I haven't tested this
[ed. note: iusemodx last edited this post 7 years, 11 months ago.]