Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How would I add external content to a page?

Started by Muut Archive 10 years ago · 4 replies · 954 views
10 years ago

I notice there are two embed/inject content style plugins but neither does what I want. I'd like to display the output from a script on the site on the home page. The script is not PHP and I do not want to use an iframe. Is there a way to do this?

I'm getting hit hard by the learning curves here, but making good progress! Thanks for any ideas.

10 years ago

Or maybe there's a way to use something like json and mustache? I'm totally unfamiliar with twig (for now), but maybe twig could take json and output it via a template?

10 years ago

Twig itself cannot, but a simple plugin could use a PHP-library or function to read the external data (for example in JSON-format), store it in the Data-folder, and output it it in a twig-template. You basically just need a plugin to read and save the data so it is available to you for manipulation.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 673 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago