add logic to allow properly configured ajax from the templates to be processed