From 70832d45e2553c788628f68613677f178cfffee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 19 Aug 2017 23:12:03 +0200 Subject: [PATCH] add documentation of homepage widget --- source/bundles/person.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/source/bundles/person.rst b/source/bundles/person.rst index b56834689..676dbd6cc 100644 --- a/source/bundles/person.rst +++ b/source/bundles/person.rst @@ -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]