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

Dynamic page generated by plugin

Started by Muut Archive 10 years ago · 1 replies · 574 views
10 years ago

Basically I have a PHP file which is generating the HTML code for the page. Please suggest how should I proceed with integrating this in Grav pages.

I tried doing this using a plugin. I managed to create the plugin using intructions in this page: https://learn.getgrav.org/cookbook/plugin-recipes#output-some-php-code-result-in-a-twig-template

I have modified the plugin to generate "<i>something</i>" instead of "something". But the page is not processing the HTML. I tried switching off/on the markdown flag, but didn't help.

Please help me out. Thank you

10 years ago

Rather than using PHP directly in Grav you use Twig to output logic. It's a safer subset of logic that ensure site security while still allowing logic and also it's a lot cleaner and more readable for designers. We have some docs to help get you started

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2551 9 years ago
Archive · by Muut Archive, 9 years ago
2 1677 9 years ago
Archive · by Muut Archive, 9 years ago
2 4964 9 years ago
Archive · by Muut Archive, 9 years ago
1 3790 9 years ago
Archive · by Muut Archive, 9 years ago
3 1792 9 years ago