Skip to content

jinja2-like templating support in VIEW[text] #629

@CkovMk

Description

@CkovMk

Please fill out these Check-boxes

  • I checked for existing similar feature requests
  • I have read the docs and checked that the feature I am requesting is not already implemented
  • My feature request consists of only one feature

Is your Feature Request related to a Problem or Annoyance?

No response

Describe the Feature you'd like

I was seeking for a way to conditionally include a variable in a VIEW. For example: 2 variables are defined: cmd and extra_args. I'd like to create a VIEW that expand to only cmd when extra_args is null: VIEW[{cmd}][text], otherwise the VIEW should expand to cmd -- extra_args: VIEW[{cmd} -- {extra_args}][text]. Note the -- is added in between.

I did not find a straightforward to do this. Please provide any hint if this is already supported.

If if condition can be supported, I think for loop over an array could be a thing too. This remind me of jinja2 template language, which I use regularly to handle complex templates.

Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions