Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

How to access yaml list / sequence (array to string conversion error)

Started by Muut Archive 11 years ago · 1 replies · 1308 views
11 years ago

I've written a list in my site.yaml:

--- yaml
times:
monday:

YAML
        - "08:00"
        - "13:00"
    -
        - "16:00"
        - "18:30"
TXT

I assumed, that the data would be accessible from the twig via

--- twig
site.times.monday.0.0

similar to json, but I get an error: An exception has been thrown during the rendering of a template ("Array to string conversion")

So how to access this data?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4061 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago