Added basic dynamic template support