Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

Started by Muut Archive 11 years ago · 1 replies · 1438 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 2288 9 years ago
Archive · by Muut Archive, 9 years ago
2 1500 9 years ago
Archive · by Muut Archive, 9 years ago
2 4750 9 years ago
Archive · by Muut Archive, 9 years ago
1 3565 9 years ago
Archive · by Muut Archive, 9 years ago
3 1625 9 years ago