Replace all string occurence in a template