jbonett
jbonett

Reputation: 11

Alfresco 4.0d Custom Aspect Search

I'm currently developing a custom search in Alfresco for some custom aspects that I've created . Can you direct me to the correct xml file which I need to edit to add my custom aspects in the search? I have researched numerous posts on the web but I couldn't find anything...

Upvotes: 0

Views: 1570

Answers (1)

Teqnology
Teqnology

Reputation: 1298

Explain better, do you mean the default advanced search in Alfresco Explorer? In that case, you should search for a file named web-client-config-custom.xml.sample inside:

/Alfresco/tomcat/shared/classes/alfresco/extension

or

/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension

Then rename the file removing the sample extension, to have web-client-config-custom.xml and copy the file inside the first path above (the "shared" one, not the webapps/alfresco one); Then, inside, search for a tag named "config evaluator" Advanced Search, it should be something like this:

     <!-- Example of configuring advanced search -->
   <!--
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
         </content-types>
         <custom-properties>
            <meta-data aspect="app:simpleworkflow" property="app:approveStep" />
         </custom-properties>
      </advanced-search>
   </config>
   -->

There, you can add your custom aspects that you created in your customModel.xml file. To extend the custom advanced search capabilities, you could add some custom content type search or properties that are not part of the aspects, like this:

<config evaluator="string-compare" condition="Advanced Search">
    <advanced-search>
        <content-types>
            <type name="myNamespace:customType" />
        </content-types>
        <custom-properties>
            <meta-data type="myNamespace:customType" property="myNamespace:customTypeProperty" />
            <meta-data aspect="myNamespace:customAspect" property="myNamespace:customAspectProperty" />
        </custom-properties>
    </advanced-search>
</config>

hope it helps..

Upvotes: 1

Related Questions