changed category and photo templates to twig