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 modular.md.
That file looks like this:
title: Ttile menu: Home simple_contact: true content: items: @self.modular order: by: default dir: asc custom: - _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 simple_contact.md 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.