SearchGridMacro
Редактировал(а) Вячеслав Мясоед 2024-12-06 11:52
Macro Parameters
| Name | Description | Mandatory | Default value |
|---|---|---|---|
| sort | Field and order to be used for ordering the results. Example: Movies.Code.MoviesClass.staticList1:asc | no | title:asc |
| facets | List of facets to be displayed on top of the grid | no | |
| showHidden | Whether the hidden pages should be included in the results | no | false |
| class | Name of the XClass whose instances are to be searched for | no | |
| filter | Filter used when performing the initial search. Example: f_property.Help.Applications.Movies.Code.MoviesClass.staticList1_string=drama | no |
Usage
Grid layout
{{searchGrid class="Help.Applications.Movies.Code.MoviesClass" showHidden="false" sort="title:asc" facets="databaseList1,staticList1"/}}
The display of the cells within the grid can be customized by creating an UIX for the UIXP org.xwiki.contrib.searchgrid.cell. An example is given in page MovieSearchGridCell for displaying Movies in a custom way, the result can be seen on MovieSearchGrid.
Table layout
{{searchGrid id="movies" class="Help.Applications.Movies.Code.MoviesClass" showHidden="false"
facets="databaseList1,staticList1"
columns="title,longText1,databaseList1,staticList1,date" limit="30"/}}
facets="databaseList1,staticList1"
columns="title,longText1,databaseList1,staticList1,date" limit="30"/}}