How to reproduce:
- Create a content type with a repeater containing
- 2 attributes of type content
- a header label referencing the 2 attributes
- Create a searchModel on this content type
- with a column for the repeater
- and only one subcolumn (one of the attribute of type content)
- Create a content of this type
- Add entries in the repeater with data for the 2 attributes
- Make a search using the search model
- There is a column for the repeater => OK
- the label of each entry has an error as it does not find the value of the content => KO
Exemple of repeater definition :
<attribute type="repeater" name="repeaterHeaderLabel"> <label>Repeater header label</label> <description>Description repeater avec header label</description> <add-label>Ajouter</add-label> <del-label>Supprimer</del-label> <header-label>{linkedArticle} {linkedArticles}</header-label> <attribute name="linkedArticle" type="content" contentType="org.ametys.web.default.Content.article"> <label>Lien 1 Article</label> <description>Article lié</description> </attribute> <attribute name="linkedArticles" type="content" multiple="true" contentType="org.ametys.web.default.Content.article"> <label>Liens 2 Articles</label> <description>Articles liés</description> </attribute> </attribute>
Exemple of search model columns :
<columns> <default> <item ref="title"> <renderer>Ametys.plugins.cms.search.SearchGridHelper.renderTitle</renderer> </item> <item ref="repeaterHeaderLabel"> <item ref="linkedArticles" /> </item> </default> </columns>
- discovered while testing
-
CMS-11870 [SearchUIColumns] repeater's subcolumns should take configured model into account
- Closed
- Référence
-
RUNTIME-3942 Refactor header labels for repeaters
- Closed