Construction: switch - case
My question is: will the construction be supported: switch case. Example: {switch ($str)} {case 1} 1{/case} {/switch}
We could, but it's not on the roadmap. I'll leave this issue open to see if more people are interested.
Thanks. I just don't want to add it to your code, because it's included in the project via composer
Feel free to submit a PR if you are up to the task!
We are interrested!
Hi guys! Do you really need switch/case? Just because there is {if}, {elseif} and {/if} already.
Smarty3 documentation for if
For Smarty4, the documentation is not enough complete to find {elseif}, but probably exists.
I think{if}, {elseif} and {/if} is enough for each case in the business logic.