add documentation of homepage widget

This commit is contained in:
Julien Fastré 2017-08-19 23:12:03 +02:00
parent a052dd7d7c
commit 70832d45e2

View File

@ -150,5 +150,34 @@ The context is :
- :code:`person` : the current person which is rendered. Instance of :class:`Chill\PersonBundle\Entity\Person`
Widgets
*******
Add a list of person on homepage
================================
The bundle provide a way to add a list of accompanyied person on the homepage:
.. code-block:: yaml
chill_main:
widgets:
homepage:
-
order: 10
widget_alias: person_list
person_list:
# customize the number of items
number_of_items: 20
# only active
only_active: true
# you can add some filtering class, which will implements
# Chill\PersonBundle\PersonListWidget\PersonFilteringInterface
filtering_class: "\Hepc\HomepagePersonFiltering"
# when the view is overriden, you can add some custom fields
# to the view
custom_fields: [school-2fb5440e-192c-11e6-b2fd-74d02b0c9b55]