rework logic so works on any sub-rendered template