How to add a modular plugin to a page

I’ve got a modular page, and the simple_contact plugin installed. I’ve followed the installation instructions to the letter, but can’t wrap my head around how to display the actual form on a modular page.

Plugin documentation says it’s supposed to function as a module on a modular page. HOW to accomplish this is not answered.

This is really a more general question: How does one display a module from a plugin? Seems reasonable that you should jack them up the same way.

There is a template for displaying the plugin: page/user/plugins/simple_contact/templates/plugins/simple_contact/form .html.twig

There’s a modular page in page/user/pages called “01.home”. In this folder, there’s a file

That file looks like this:

title: Ttile
menu: Home
simple_contact: true
    items: @self.modular
        by: default
        dir: asc
            - _top
            - _quote
            - _highlights
            - _twocol
            - _textblock

The other sections display fine, and in the correct order (All the corresponding folders and .md files are in place). The form does not display at all.

I’ve tried adding a module content folder “_simple_contact” (and a inside) to the page, in the hopes that grav would get that it should fetch the template from the plugin. That didn’t work. Instead it throws an exception, looking for “modular/simple_contact.html.twig”. So it doesn’t get that it should use the plug.

I’ve tried creating the template Grav asks for, and calling the plugin from there. But that quickly turned really awkward, because there is no documentation on how to render a plugin template. At worst, it throws an error. At best, it displays an empty section (only some arbitrary div wrappers and such, but no content, and absolutely no form.)

My question, I guess, is “How does one display a module from a plug on a modular page?”, because I can’t really seem to do that.

I’m assuming that the simplecontact plugin registered the user/plugins/simplecontact/templates folder with Twig. That being so if you wanted to explicitly include the template from any other twig template you would use the following:

{% include 'plugins/simple_contact/form.html.twig' %}

Is that what your asking?

That does the trick. Thanks a lot!

I did a lot of convoluted stuff because I assumed I could somehow do this from markdown.

It was a lot simpler this way, though.