Closed mfuggle closed 1 year ago
Anyone going to respond?
I will respond after the thanksgiving holidays.
Many thanks... I want to display a gallery at the bottom of a blog post. My folder structure is: Pages Folder
and my gallery.md, post.md and blog.md are shown below:
I have removed as much as possible from the .md files to simplify things. My issue is that the Blog displays with its child posts but the child post does not display the gallery. I have tried to track this down but have failed. If someone could point me in the right direction I would be most grateful. Cheers Martin Fuggle
Has Thanksgiving finished yet? It would be really helpful to get some assistance after 7 days.
yes, it's finished :)
the problem is that the post page doesn't know it should do anything with the gallery modular sub-page.
I see you have attempted to create a collection in post.md
but the syntax is incorrect, it should be:
post.md
:
content:
items: self@.modular
Then the post.html.twig
template needs to be modified to display any pages from the modular collection below the post:
post.html.twig
:
...
{% block items %}
...
{% for module in page.collection() %}
{{ module.content|raw }}
{% endfor %}
{% endblock %}
{% block sidebar %}
{% include 'partials/sidebar.html.twig' %}
{% endblock %}
...
That should do it.
Great - I just needed to put the lightbox.html.twig in the theme folder and everything worked as planned.
Many thanks Martin Fuggle 0408 265 586 @.***
On Wed, 30 Nov 2022 at 09:33, Andy Miller @.***> wrote:
yes, it's finished :)
the problem is that the post page doesn't know it should do anything with the gallery modular sub-page.
I see you have attempted to create a collection in post.md but the syntax is incorrect, it should be:
post.md:
content: items: @.***
Then the post.html.twig template needs to be modified to display any pages from the modular collection below the post:
post.html.twig:
... {% block items %} ...
{% for module in page.collection() %} {{ module.content|raw }} {% endfor %}
{% endblock %}
{% block sidebar %} {% include 'partials/sidebar.html.twig' %} {% endblock %} ...
That should do it.
— Reply to this email directly, view it on GitHub https://github.com/getgrav/grav-premium-issues/issues/323#issuecomment-1331405629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANR6FKEUPZ7NZP35RNX3T3WK2AEHANCNFSM6AAAAAASITFOB4 . You are receiving this because you authored the thread.Message ID: @.***>
👍🏻
Hi Folks, I am a Grav Newbie but spending a lot of time learning. I am using the Typhoon Blog skeleton and want to be able to display a Gallery immediately below the Blog. I think I need to create a Modular page and include type Blog and Type Gallery. However when I create a Modular Page I am not able to see type Blog to add to the page. I am probably failing to explain myself well but that's because I haven't yet managed fully understand Grav as well as the Typhoon theme. I just need to be pointed in the right direction because I am floundering right now. Regards Martin Fuggle
P.S. I have also posted this on the Typhoon github. Where should I post Grav Typhoon issues/questions?