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

Modular into modular

Started by Muut Archive 9 years ago · 2 replies · 512 views
9 years ago

Hi,

I'm wondering if it's possible to have modular pages into my modular template.
It'll look like this (it's a curriculum vitæ page):

Page : Modular

---- Part1 : markdown content - presentation
Part2 experiences :
subpart 1 : experiences 1 : template + content
subpart 2 : experiences 2 : template + content
Part3 : markdown content

Is it possible (for now, what I tried doesn't work) ? Is it a good way to use Grav ?
Am I missing something ?

Thanks in advance

9 years ago

If the question is, have submodulars

TXT
pages/
pages/01.modular/modular.md
pages/01.modular/_part1/text.md
pages/01.modular/_part1/_subpart1/text.md

the answer is no, not out of the box.

9 years ago

OK, so I'm not that crazy.

I made it work an hour ago with

TWIG
{% for module in page.collection() %}
   {% include 'modular/subpart.html.twig' with {'page': module} %}
{% endfor %}

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1336 9 years ago
Archive · by Muut Archive, 9 years ago
2 925 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2941 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago