First off, thank you for this brilliant piece of coding! I’ve played around with Grav for a few days now and decided to change a website that was running on drupal (overkill for such a simple 1-page website).
Im off to a pretty good start, got most of the custom theme down by now. Just the one-page layout navigation I can’t wrap my head around…
I’ve a modular.md which has the line onpage_menu: true, additional all of the _Page > text.md that i use for the content have a “menu: menu_title” in the yaml header.
which in the end only generates the menu item that I provide in the modular.md, and not of the actual ‘modules’. Could someone point me into the right direction? I assume it has to do with my twig markup above. When checking the skeleton/theme of Boxify I notice some different markup. I tried using exactly that twig markup, but no avail.
from boxify i tried including the fo llowing:
{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
{% for module in row %}
{% if not module.header.hidemenu %}
Additional question for bonus points… My ‘modules’ have all the same mark up, I assume having one e.g. text.html.twig and use text.md in _folder1 & folder2 would generate the same block twice, with different content… Unfortunately as soon as i use text.md for the second type it doesn’t display anything anymore, once i remove the second use of text.md, the first block shows up again.
–```
Apologies for the long question, Im really trying to get the hang of how Grav works as it seems the ideal solution for any website for which a full blown cms is overkill.
Regarding text.html.twig you have to remember about one thing. If text.html.twig is inside “modular” folder then it’s supposed to work with text.md modular pages. It will not work with single pages. And vice versa. If text.html.twig is inside templates folder then it will only work with single pages. It will not work with modular stuff.
Unfortunately regarding the text.md & text.html.twig not much changes… text.html.twig is in the folder templates>modular.
it seems that Grav keeps using the default.html.twig that is in the templates folder. However as soon as i delete default.html.twig I get an error, although there is no content that is using the default.html.twig file or referring to it…
the problem seemed to have changed slightly… the modular menu works fine now, the first content-block (module) shows up fine.
the second content-block in pages > _page2 > text.md… keeps defaulting to display template ‘default’. when i actually tried to save it and my permissions were set wrong i noticed it said it can’t open/edit the file default.md… which is funny as there is no such file… there is a text.md file in that folder.
Another weird issue is that the moment i delete the file default.html.twig from the templates > modular folder i get an error… I’ve replaced the default.html.twig with an empty file which seems to work.
If i upload the text.md file in the folder pages > _page2 > …[here]…
and i check the admin plugin, it shows me that it’s set up with the display template default causing the missing default.html.twig error as well as not showing up at all, as i emptied default.html.twig as mentioned before.
The moment i add the same page manually through the admin plugin, everything works out like it supposed to.
so for some reason my Grav installation fails to link text.md to text.html.twig it seems… is that even possible?