mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add documentation of homepage widget
This commit is contained in:
parent
a052dd7d7c
commit
70832d45e2
@ -150,5 +150,34 @@ The context is :
|
|||||||
|
|
||||||
- :code:`person` : the current person which is rendered. Instance of :class:`Chill\PersonBundle\Entity\Person`
|
- :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]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user