hello, I’m new to web dev and to Grav, and I’m trying to create a modular landing page - For a one-page style landing page with several subsections, that can be reached via the menu, a modular page seems like the right choice, right?
When creating a new module with the Quark theme, I was wondering what the best template for each module would be - the way I understood it, each template has a different set of features available, correct? Or could I put any element (e.g. gallery) on any page, no matter the chosen template? The available choices in my installation are features, gallery, hero and text. I couldn’t find a description of them in the docs - maybe I overlooked something? If so, could someone point me to a good ressource about the modular templates - or else tell me a bit more about them so I could make more informed choices?
I’m basically trying to recreate this site as a one-pager, so each page would go into a module on a modular page - or would you say that’s the wrong approach? Thanks for any advice!
Whether to use modular pages depends on what you are trying to achieve. They come with their own specific behaviour.
A modular page can show any combination of modules provided by a theme.
The set and order of modules is defined by the collection defined in the modular page.
The template for a module can be used multiple times in a single modular.
Modules can be shown in any order you like.
The set of modules provided by a theme is not fixed, you can create and/or alter module templates at will.
If so, could someone point me to a good ressource about the modular templates
You could download the One-Page Site skeleton which gives you an idea of using a one-page modular.
Hello and welcome. i just visited your website. this is unrelated to your question and i hope this wont bother you but your image’s size on page should be reduced imo which is hard to load and effects SEO - U/X.
Yes, I have. They explain how a modular page works, but my question is specifically about each of the modular templates, I didn’t see these explained in detail.
That’s good to know.
I’ll also check out the One-Page skeleton, thanks for the pointer!
my question is specifically about each of the modular templates, I didn’t see these explained in detail.
Every theme defines its own set of unique custom templates. There is for example no standard implementation of the “features” module template. The templates defined by a theme have no relation with any other theme’s template using the same name. Not in functionality, not in layout, not in styling and not in implementation.
The main Grav documentation is about understanding general concepts.
The chapter about “Modular Pages” happens to use the Quark theme’s based One-Page skeleton. Explaining the functionality of the “features” template of Quark in the general docs, would not apply to any “features” template in any other theme.
It’s up to the theme developer to describe its templates in the README (if the owner wants to).