Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Import CSV table into page

Started by blackbird 3 years ago · 1 replies · 830 views
3 years ago

Is there a way to import a csv file into a (default) page and have it rendered as a table?

The 'table-importer' plugin (which is not maintained anymore) does not work on my Grav v1.7.41 site.

3 years ago

If you have a custom Plugin (Custom Plugin tutorial) in your project, you could try to write a function which takes the CSV and converts it to a list of objects which you can use in your twig template (I think there should be one which is used to export flex-objects to CSV Formatter).

I don't know if you can convert your CSV into a flex-directory and use it in your templates as flex-objects.

I'm not 100% sure, these are just some ideas on how it could be done

Suggested topics

Topic Participants Replies Views Activity
Plugins · by complanar, 6 days ago
6 265 2 days ago
Plugins · by BenLaKnet, 3 days ago
1 97 3 days ago
Plugins · by complanar, 4 weeks ago
2 415 3 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 706 2 months ago
Plugins · by Mathieu Lecouturier, 2 months ago
3 545 2 months ago