Hello there.
I'm changing a particle of Gantry framework, with Grav. I have the .yaml file with the following code:
items:
type: collection.list
array: true
label: Tab Items
description: Create each tab to display.
value: name
ajax: true
fields:
.member:
type: input.imagepicker
label: Member Image
.position:
type: input.text
label: Position
.socials:
type: collection.list
label: Social Links
array: true
value: name
ajax: true
fields:
.social_text:
type: input.text
label: Social Text
.social_link:
type: input.text
label: Social Link
In Twig template I have:
{% for item in particle.items %}
<div class="person-name">
<h3>{{item.name_member}}
</div>
<div class="person-position">
{{item.position}}
</div>
<div class="person-social">
{% for item in particle.socials %}
<a target="_blank" href="{{item.link}} aria-label="{{item.text}}"><i class="{{item.icon}}"></i></a>
{% endfor %}
</div>
In Layout.yaml file I have:
items:
-
member: 'gantry-media://member-man..png'
position: Something
name_member: Anybody
socials:
-
social_text: Facebook
social_link: 'https://facebook.com'
social_icon: 'fa fa-facebook'
name: facebook
name: Anybody
The question is How can I call to socials items from Twig template?. I've tried some alternatives (for item in particle.socials, for item in particle['.socials'], for social in socials). I don't know how can I do it.
Can anybody help me?
Thanks in advance.