We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Feature Request: Switch for Volt

Feature request for Switch Case statements something mirroring twig:

https://craftcms.com/docs/templating/switch

{% switch matrixBlock.type %}

 {% case "text" %}

     {{ matrixBlock.textField | markdown }}

 {% case "image" %}

    {{ matrixBlock.image[0].getImg() }}

 {% default %}

    <p>A font walks into a bar.</p>
    <p>The bartender says, “Hey, we don’t serve your type in here!”</p>

{% endswitch %}

The devs are expecting NFR-s on the github page, I've copied in yours:

https://github.com/phalcon/cphalcon/issues/13107