People module for PyroCMS 3 with support for dynamic fields and assignments.
php artisan addon:publish people
- Edit the
view
view inresources/<site name>/addons/wirelab/people-module/views/people
In your theme's service provider add the following:
protected $overrides = [
'wirelab.module.people::person/view' => 'your view path here',
];
- In the people module go to
fields
and make a new field - In the
people
section click onassignments
and assign the field
- Create a multiple field in the pages module, assign it to People > People
- Assign the field to a page type
- In the page type loop over
page.your_slug
and callrender()
on a person. Or callrender()
onpage.your_slug
to have it to loop for you. Examples:
page.your_slug.render()
{% for person in page.your_slug %}
person.render()
{% endfor %}
Not calling render will return the attributes of the person.
{% for person in page.your_slug %}
{{ person.name }}
{{ person.email }}
{% endfor %}