Rendering based on current element, as well as children

ref #429