Dynamic template support for tree rendering directive