Integrating twig conditions for template