template file and setting retrieval