using twig for view logic

Is better than writing custom php logic