Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Display sub-pages on modular page

Started by Muut Archive 10 years ago · 3 replies · 831 views
10 years ago

Hi all

My home page is a modular page. One of the modules is a slideshow. I want to create slides as sub-pages of the slideshow page/module.

My question is; how can I show sub-pages within a modular page?

10 years ago

Never noticed that there's a plugin for that! In case you want to try to do it manually, like I did (used this to display the contents of a "Pricing" subpage on a modular home page — maybe it works for a slideshow as well):

/pages/10.home/_pricing/resource-render.md

TWIG
⁣```
title: Pricing
menu: homepage pricing
process:
    twig: true
⁣```

{% include '/modular/resource-render.html.twig' with {'page': page.find('/pricing/_pricing')} %}

/themes/[theme]/modular/resource-render.html.twig

TWIG

{{ page.content }}
---
9 years ago

Thanks for the help.
I decided to simply use blueprints to create a form (list) which enabled me to dynamically add images with titles and captions etc.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1348 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2946 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago