protect against passing non-existent array to foreach
return main template file instead of page tempate