Repeating sections at one page

first-time

#1

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!


#2

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.


#3

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!


#5

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

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

#6

Hi Julie,

What tradedemon says is correct. Also i would recommend to enable the debug bar. With it you can dump variables and show them inside the debug bar. That way you can inspect how the data is structured.


#7

Hi guys, I found the issue. Thanks :smiley: