Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

One-page theme problem

Started by rohan sharma 8 years ago · 3 replies · 665 views
8 years ago

In the one page theme where does the id=modular-features comes from (the 'why grav build better sites' part)? In the file structure it is feature.md which contains content that means it is rendered through feature.html.twig, but when i search the base.html.twig there is no

{% block feature%}{% endblock %} or {% block modular%}{% endblock %} anything of this sort.

the part of it comes from(in thebase.html.twig) what i understood is:

\<section id="start">
{% block body %}
\<section id="body-wrapper" class="section">
\<section class="container {{ grid_size }}">
{% block messages %}
{% include 'partials/messages.html.twig' ignore missing %}
{% endblock %}
{% block content %}{% endblock %}
\</section>
\</section>
{% endblock %}
\</section>

when i remove this part it takes out the entire body as expected, but then where does the features.html.twig comes in place????

last edited 06/17/18 by rohan sharma
8 years ago

okay, i figured out that base.html.twig extends modular.html.twig which has the page.collection() which gets the feature.html.twig to work. but now when I remove the entire content of feature.html.twig and save it , the page still works. I though if i remove the feature.html.twig it should stop rendering feature.md file but thats not happening . wtf?

8 years ago

Disable cache in your development environment.

Suggested topics

Topic Participants Replies Views Activity
General · by jeremycherfas, 4 days ago
3 92 1 hour ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 216 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago