sets up templates with an itemcontroller