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

[SearchModel] Reference table : Impossible to have a contentTypes field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.13, 4.3.0
    • 4.2.2, 4.3.0
    • None
    • None
    • 4.3 RC2

      In a content, I have a field linked to a reference table. It's on an abstract level (like Mention in the ODF for example).
      I add a custom search model on this field like this :

      <cms:widget-params>
          <cms:param name="allowSearch">true</cms:param>
          <cms:param name="modelId">search-ui.my-search-model</cms:param>
      </cms:widget-params>

      And my file my-search-model.xml is like this :

      <?xml version="1.0" encoding="UTF-8"?>
      <SearchModel>
          <content-types>
              <content-type id="odf-enumeration.Mention"/>
          </content-types>
          
          <simple-search-criteria>
              <criteria field-ref="title">
                  <test-operator>like</test-operator>
              </criteria>
              
              <criteria system-ref="contentTypes" multiple="true">
                  <widget-params>
                      <param name="excludeReferenceTable">false</param>
                  </widget-params>
              </criteria>
          </simple-search-criteria>
          
          <columns>
              <default>
                  <column system-ref="contentTypes">
                      <label>Type</label>
                  </column>
                  
                  <column metadata-ref="title">
                      <renderer>Ametys.plugins.cms.search.SearchGridHelper.renderTitle</renderer>
                      <label>Libellé</label>
                  </column>
              </default>
          </columns>
      </SearchModel>

      But the field excludeReferenceTable in the enumerationConfig is forced to true and is not configurable.

            bmaurel Bérénice Maurel
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: