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

Need to parse a csv and send data to a twig template

Started by Muut Archive 11 years ago · 0 replies · 945 views
11 years ago

As I said in the subject I need to parse a csv inside my theme Theme.php inside root folder of the theme and send all the parsed data to a specific template.

theme_folder
ThemeTemplate.php
templates
template.html.twig(the one I need to send parsed data to)

My Theme.php has the following content:
<?php
namespace Grav\Theme;
use Grav\Common\Theme;

class ThemeTemplate extends Theme
{
////read csv here and send all parsed data to template.html.twig
}
?>

Any suggestions/examples in order to achieve this?

Thank you!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2588 9 years ago
Archive · by Muut Archive, 9 years ago
2 1703 9 years ago
Archive · by Muut Archive, 9 years ago
2 4996 9 years ago
Archive · by Muut Archive, 9 years ago
1 3826 9 years ago
Archive · by Muut Archive, 9 years ago
3 1810 9 years ago