Skip to content

Output array from custom tag as var rather than iterable tag pair #364

@jesseleite

Description

@jesseleite

If I make a custom antlers tag and return an array of data, I know we can iterate over using a tag pair:

{{ my_tag_array_data }}
    {{ title }}
    {{ author }}
{{ /my_tag_array_data }}

But what if I want to pass that data into a vue component:

<my-component :some-prop='{{ my_tag_array_data | to_json }}'>

Maybe the user could explicitly set $isPair = false in the custom tag, or maybe antlers could detect if modifiers are used?We

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