add the function to show the selected template