Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-4430

Possibility to add a converter function in the property mapping of the search tool.

XMLWordPrintable

      Extjs have a 'convert' property in Ext.data.Field but there is currently no way to use the feature in the core ametys search tool (see : org.ametys.cms.helper.SearchContentHMIHelper.getRecordMapping).

      I propose a patch to enable this feature.
      It works as follows:
      To add a converter in the property-mapping of a search tool factory just replace the just add a 'converter' node for the property of your choice.

      <property-mapping>
          <property id="title" path="metadata/title"/>
      </property-mapping>
      

      with this declaration

      <property-mapping>
          <property id="title" path="metadata/title" type="array">
              <converter>my.custom.Converter</converter>
          </property>
      </property-mapping>
      

      Where my.custom.Converter is your JS convert function (see the Extjs doc)

            Unassigned Unassigned
            trizzi Thibaut Rizzi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: