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

Question from a noob

Started by Muut Archive 12 years ago · 3 replies · 407 views
12 years ago

First off, great software. Very fast and easy on the eyes.

To the meat and potatoes... Is it possible to embed code into a page? I need a contact form and either my Google-Fu is worse than I thought or I'm just looking for something that's not there. Can I embed HTML5/PHP into a page's markdown file? Or do I need a new template for that page and embed the code there?

12 years ago

You can certainly embed HTML in a markdown page. HTML within markdown is 100% standard and supported as part of the markdown 'spec'. If you need logic, you can use Twig in markdown content too as long you enable PHP in the page header (see the docs on this). You can also do the Twig in a custom template file.

If you MUST have PHP, you will need to create a Grav plugin or a Twig filter.

10 years ago

I can't find a doc that explains enabling PHP in the page header. Can you please provide more info on this.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1359 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2956 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago