How to load JSON file content into Twig

Created on 1 March 2024, 10 months ago
Updated 9 March 2024, 10 months ago

Hello, thank you for the previous support that has been resolved. I am very interested in tokens and twigs because they are very flexible in combining and outputting content.

I have gained another interest recently. I hope to store some simple data in a JSON file and put it in a local folder on the server for loading to Twig, by this way, I don't have to create a lot of fields in Drupal, reducing the burden on the database. I have found some relevant knowledge, but I still cannot solve this problem. When it is loaded, it always remains null.

Thank You.


💬 Support request
Status

Closed: outdated

Version

4.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024