first, thanks alot for your help.
but unfortunately it is not working.
the first part of the code is working fine, if the parent has content it is displayed, but the other case (if parent is empty) it never displayes anything in the section else
It's probably not working because $grand is not set. You are setting this to the grandparent aren't you?
Try adding {$grand|attribute(show,2)} to the template to see what value it has. Also turning on debugging will really help as it will tell you if you are tring to access variables that do not exist etc.