factor out call to show stand-alone error message
move the new template pre-processing functions to the WebTools so they can be used in other modules as well