Skip to content

Don't seem able to access values #6

@jeremycherfas

Description

@jeremycherfas

I know you said we have to implement ourselves, but I have a problem.

{{ dump(page.header.import) }} works fine and tells me I have a nested array with three top-level elements. But absolutely everything I have tried to access the first element has failed.

{{ dump(page.header.import[0]) }} gives null

I tried to get back to basics.

{% set myvar = ['foo','bar','crap'] %}
{% set newvar = ( myvar|slice(0, 1)) %}

Works exactly as expected. But {% set newvar = ( page.header.import|slice(0, 1)) %} results in a blank, not null, when I {{ dump(newvar) }}

I really want to be able to access that array that is the top element, but I just cannot see how. Any help gratefully received.

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