AnsweredAssumed Answered

Problem with custom advanced search

Question asked by theoryoflinkin on Feb 14, 2014
Latest reply on Jul 15, 2014 by umaistudio
Hello,

I'm trying to custom the existing "cm:content" search form by adding some fields.

The fields I want to add ("cm:categories" for searching by categories, "cm:local" for searching by file location and 2 custom fields) are displayed at the screen.

But when I want to test this, the search returns me nothing!

I read a lot of things about some solutions but nothing works for me.

Here is a sample of my share-config-custom.xml




<config evaluator="model-type" condition="cm:content">
      <forms>
          <form id="search">
      
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
          
                           <!– New fields: the search works well for these –>                
            <show id="cm:created" />
            <show id="cm:creator" />
           
                           <!– New fields: the search does not work at all –>     
            <show id="cm:categories" force="true" />
            <show id="cm:locale" force="true" />              
            <show id="model:folderType" force="true" />
            <show id="model:folderEtat" force="true" />
           
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
           
      <field id="cm:created">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
      <field id="cm:creator">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
           
            <field id="cm:categories">
              <control>
                <control-param name="compactMode">true</control-param>
                <control-param name="showSubCategoriesOption">true</control-param>
                </control>
            </field>
             <field id="cm:locale">
                                 <!– custom template: work well –>
             <control template="/org/alfresco/components/form/controls/space.ftl" >
            
             </control>
            </field>        
            <field id="model:folderType">
                                  <control template="/org/alfresco/components/form/controls/number.ftl">
            
              </control>
                           </field>
            <field id="model:folderEtat">
                                  <control template="/org/alfresco/components/form/controls/number.ftl" >
            
              </control>
                           </field>
                    </appearance>
                 </form>
           </forms>
       </config>



Could someone help me, please? (sorry for my english)

Outcomes