create base template & handle blank url