cancel
Showing results for 
Search instead for 
Did you mean: 

Aspect and Advanced Search

сougar
Champ in-the-making
Champ in-the-making
Hello!
I've finally decided to figure out how to work with aspects and types in Alfresco.
The task is simple - to add one property (the index number) to the document.
While writing I ran into two troubles. (Everything below was set up in Share)
It would've been more convinient to use aspect instead of type.
1) Problem for-mode="view"  for aspect, which means I want to hide the name of the document from user. As far as I understood, it is impossible to do for-mode="view". So how is it possible then?
2) Problem of setting up the Advanced search. I can set it  up for type but I failed to do it for the aspect. Can somebody offer a solution please?

<config evaluator="string-compare" condition="AdvancedSearch">
   <advanced-search>
       <forms>           
          <form label="number" description="Search number"> mk:number</form>
       </forms>

   </advanced-search>
</config>


   <config evaluator="model-type" condition="mk:number">
<forms>
<form id="search">
   <field-visibility>
   <show id="mk:numberID"/>
   </field-visibility>
   </form>
   </forms>
   </config>
</alfresco-config>
where …-model.xml

   <aspects>
      <aspect name="mk:number">
       <title>Number of doc</title>
         <properties>
            <property name="mk:numberId">
               <title>Number of doc</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
                   <index enabled="true">
                     <atomic>true</atomic>
                  </index>
               <constraints>
                  <constraint ref="mk:val"/>
               </constraints>
            </property>
         </properties>
      </aspect>
  </aspects>
1 REPLY 1

guilherme_souza
Champ in-the-making
Champ in-the-making
I think that if you edit the file share-form-config.xml (Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco) you'll resolve all your troubles.