use template registry to check for swig and set default layout instead of having the overhead of fs.exists