update template to handle relative paths for urls