Skip to content

It would be nice to have {#switch}{:case}{/switch} #9257

Closed as not planned
Closed as not planned
@Gorbulev-Sergey

Description

@Gorbulev-Sergey

Describe the problem

Sometimes it is necessary to use "switch/case", because with a large monotonous list, "if/else if" overloads the code.

Describe the proposed solution

I would like to have something like:

{#switch variable}
    {:case "first"}
      ... something first ...
    {:case "second"}
      ... something second ...
    {:default}
      ... other ...
{/switch}

Alternatives considered

Thanks guys!

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions