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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Display random variables from 2 different modular pages

Started by Muut Archive 10 years ago · 0 replies · 327 views
10 years ago

Hi,
I have 2 different modular pages
The 1st page is members.md and this is an exemple of what it contains
1:
name: member1
title: title1
2:
name: member2
title: title2

And another page others.md:
1:
name: other1
title: other_title1
2:
name: other2
title: other_title2

I wanna display in members.html.twig a only 1 name and title randomly from members.md or others.md:
How can I do it in twig and is it possible to read data from another md file in grav ?

Thank you in advance

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1281 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4018 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1077 9 years ago