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

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

Started by Muut Archive 11 years ago · 0 replies · 902 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 2288 9 years ago
Archive · by Muut Archive, 9 years ago
2 1500 9 years ago
Archive · by Muut Archive, 9 years ago
2 4751 9 years ago
Archive · by Muut Archive, 9 years ago
1 3566 9 years ago
Archive · by Muut Archive, 9 years ago
3 1626 9 years ago