МетаЭра

SearchGridMacro

Редактировал(а) Вячеслав Мясоед 2024-12-06 11:52

Macro Parameters

NameDescriptionMandatoryDefault value
sortField and order to be used for ordering the results. Example: Movies.Code.MoviesClass.staticList1:ascnotitle:asc
facetsList of facets to be displayed on top of the gridno
showHiddenWhether the hidden pages should be included in the resultsnofalse
className of the XClass whose instances are to be searched forno
filterFilter used when performing the initial search. Example: f_property.Help.Applications.Movies.Code.MoviesClass.staticList1_string=dramano

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"/}}