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

Repeating sections at one page

first-time

Started by Julia Schmolmüller 7 years ago · 5 replies · 911 views
7 years ago

Hi guys,
I am totally new at working with GRAV. I have problems to build the team side of my website. Basically it is a repeating content for each team member with different content inside. But the layout is the same. And I am not sure, if the modules functionality is the right way to do that. I just want at the team side some fields in the Backend to fill out for each member. Isn't there some functionality like in WordPress to solve this? Thank's for your help!

7 years ago

Hi Julie,

You need the "list" field for that. Works just like the acf repeater from wordpress. Of course you have to add the parameters to your blueprint in your custom theme to make it work.

7 years ago

Thanks for your reply. It is exactly the thing I need. But I can't make it work, I guess I miss something. In my theme in the blueprints folder I made a file named team.yaml with the fields inside. Then I made inside the templates directory the team.html.twig template for the team.md file. Inside the twig file I have something like:
{% for person in page.header.team %}
{{feature.text}}
{{feature.url}}
{{% endfor {% }

I can't find it in the documentation, maybe you can help me with that.
Thanks!

1 reply
7 years ago

I’d need to see your blueprint but inside the for loop you need to use person.

TWIG
{% for person in page.header.team %}
{{person.text}}
{{person.url}}
{{% endfor {% }
👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Sebadamus, 7 days ago
5 151 21 hours ago
Themes & Styling · by martynfoster735, 1 week ago
1 193 1 week ago
Themes & Styling · by Justin Young, 3 weeks ago
1 241 3 weeks ago
Themes & Styling · by Slebeig, 1 month ago
4 376 1 month ago
Themes & Styling · by Pedro M, 4 months ago
4 746 3 months ago