Hi guys,
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.
In my header.html.twig i've the following code:
<ul>
{% for page in pages.children %}
<li><a href="#{{ page.menu }}">{{ page.menu }}</a></li>
{% endfor %}
</ul>
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 %}
<li>
<a href="#{{ _self.pageLinkName(module.menu) }}"><i class="fa fa-link"></i>{{ module.menu }}</a>
</li>
{% endif %}
{% endfor %}
--```
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.
Thanks,
Laurens