Skip to content

Use expressions in attribute values #35

Description

@cossssmin

@Scrum what do you think about adding support for posthtml-expressions inside attribute values?

So we could then do:

<extends src="{{ condition ? 'primary' : 'secondary' }}.html">

... or:

<block name="{{ condition ? 'foo' : 'bar' }}">

I know you can just use posthtml-expressions in the plugins: [] option, but this can result in multiple expression evaluations if your build chain uses posthtml-expressions later on (example).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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