AnsweredAssumed Answered

Problem with custom advanced search

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

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">
          <form id="search">
               <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 id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               <field id="cm:modifier">
                     <control-param name="forceEditable">true</control-param>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
      <field id="cm:created">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
      <field id="cm:creator">
                     <control-param name="forceEditable">true</control-param>
            <field id="cm:categories">
                <control-param name="compactMode">true</control-param>
                <control-param name="showSubCategoriesOption">true</control-param>
             <field id="cm:locale">
                                 <!– custom template: work well –>
             <control template="/org/alfresco/components/form/controls/space.ftl" >
            <field id="model:folderType">
                                  <control template="/org/alfresco/components/form/controls/number.ftl">
            <field id="model:folderEtat">
                                  <control template="/org/alfresco/components/form/controls/number.ftl" >

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