cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Share Advanced Search Customization

gwad
Champ in-the-making
Champ in-the-making
Hi,

I have followed this example exactly as mentioned: http://wiki.alfresco.com/wiki/Share_Advanced_Search , to configure my Alfresco Advanced Search screen. I am able to select the 'SOP Document' from the 'Look for:' menu as well, and able to see my custom fields. However, not even the 'Keywords' field is searchable through this template. Why is that? If I select 'Content' from the 'Look for:' menu, then the search is perfect. It seems to me that the example has just created a dummy screen that doesn't actually do anything.

How do I give this new form some searching capability?

Note: I have noticed that when I select my new form and search, the last part of the URL contains "datatype":"my:sop". If I manually changed this to "datatype":"cm:content" and press Enter, the results appear. Seems to tell me that the problem lies in this area.

Any help would be greatly appreciated.

Regards,

Gwad
23 REPLIES 23

gwad
Champ in-the-making
Champ in-the-making
May I promote my own blog post in the matter?  
http://loftux.se/en/2010/03/22/set-the- … le-upload/
It may need to be adapted to current version of alfresco, but should get you started

Sure Loftux, please go ahead! Smiley Happy

Create a rule on that folder, select the action "Specialize" and choose your custom type.

Thanks for that Alarocca. Let me check that out.

gwad
Champ in-the-making
Champ in-the-making
Hi,

I do have another query and any help would be greatly appreciated. Say I have 2 customized templates showing in the 'Look for:' menu, ie: HR and Marketing (along with the default 'Content' and 'Folders'). By default all 4 of the drop downs are available to any user who logs into the Alfresco Share. But is it possible to configure one user to be able to see just the 'HR' template in the 'Look for:' menu, while another user who logs in SHOULDN'T be able to see the 'HR' but rather the 'Marketing' template from the 'Look for:' menu.

How is it possible to set such a security?

Thanks

loftux
Star Contributor
Star Contributor
Since you have an object with types, you should be able to manipulate this objekt with javascript
http://wiki.alfresco.com/wiki/3.4_JavaScript_API

Try creating groups, check if the user is in the group, and manipulate the types object accordingly.

francesco_forna
Confirmed Champ
Confirmed Champ
Dear All,
we try to customize the share advanced search by introducing categories and tags. So we have modified the share-form-config.xml by put both cm:taggable and cm:categories (see piece of xml below). The cm:categories search works well.
But we havent' understood the cm:taggable search, because the select box shows categories, not tags defined by users.
Could you have any ideas about this issue? How we can configure the advanced search to show tags?

Thank you,
Francesco.

<form id="search">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
            <show id="cm:author" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
            <show id="cm:created" />
            <show id="cm:taggable" force="true" />
            <show id="cm:categories" 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:taggable">
             <control>
               <control-param name="compactMode">true</control-param>
             </control>
            </field>
            <field id="cm:categories">
             <control>
               <control-param name="compactMode">true</control-param>
             </control>
            </field>
            </appearance>
         </form>

We also customized the share advanced search form to include cm:categories,  when more than one categories are selected in the search form,  all items links with any of these categories are returned, i.e an OR search is executed.  Are there any ways to configure/change this behavior so that an AND search is resulted (only items links to all selected categories are returned).  We are using alfresco 4.2f community and now trying out 5.0a

Thanks.

loftux
Star Contributor
Star Contributor
Try this under appereance section
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>

mikeh
Star Contributor
Star Contributor
But we havent' understood the cm:taggable search, because the select box shows categories, not tags defined by users.
Could you have any ideas about this issue? How we can configure the advanced search to show tags?
Always a good idea to look at how existing forms are configured:
<field id="cm:taggable">
  <control>
     <control-param name="compactMode">true</control-param>
     <control-param name="params">aspect=cm:taggable</control-param>
     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
     <control-param name="createNewItemIcon">tag</control-param>
  </control>
</field>

Thanks,
Mike

francesco_forna
Confirmed Champ
Confirmed Champ
Yes, it works!!

Thank you very mutch.

I suggest Alfresco Documentation Support to add this tip to wiki Advanced Search Customization.

Francesco.

mikeh
Star Contributor
Star Contributor
I suggest Alfresco Documentation Support to add this tip to wiki Advanced Search Customization.
The wiki is a community resource - feel free to edit it yourself :wink:

Mike

francesco_forna
Confirmed Champ
Confirmed Champ
Ok,
I have just updated the wiki page:

https://wiki.alfresco.com/wiki/Share_Advanced_Search

I would like to thank Loftux for his help.

Bye,
Francesco.