Skip to content

Twig Syntax Error when using examples #4

@schlagmichdoch

Description

@schlagmichdoch

All examples that use arrays as parameters fail with a Twig Syntax Error as the twig array syntax is wrong:

Failing:

{% do craft.prefetch.register('https://anothersite.com/myFonts.css', 'stylesheet', ['media' => 'print', 'crossorigin' => true]) %}

Working:

{% do craft.prefetch.register('https://anothersite.com/myFonts.css', 'stylesheet', {'media': 'print', 'crossorigin': true}) %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions