Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Dynamic page generated by plugin

Started by Muut Archive 9 years ago · 1 replies · 464 views
9 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

9 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 1333 9 years ago
Archive · by Muut Archive, 9 years ago
2 924 9 years ago
Archive · by Muut Archive, 9 years ago
2 4055 9 years ago
Archive · by Muut Archive, 9 years ago
1 2938 9 years ago
Archive · by Muut Archive, 9 years ago
3 1111 9 years ago