Add Smart Folder To Site with Rest Api

cancel
Showing results for 
Search instead for 
Did you mean: 
hilal
Active Member II

Add Smart Folder To Site with Rest Api

Hi all,

I m using Alfresco community 5.2 version. There is a smart folder template in data dictionary and I want to use this template in a site using rest api.

How can I add this template as smart folder to site ?

Thanks in advanced..

6 Replies
cesarista
Customer

Re: Add Smart Folder To Site with Rest Api

Hi:

I suppose the procedure is somehow similar to the one for setting a smart template in Share:

 - Add smf:customConfigSmartFolder aspect to documentLibrary folder of your site, for example.

 - Add smf:custom-template-association association to the folder, pointing to the defined smart template noderef.

You may check it in Node Browser.

Hope it helps.

Regards.

--C.

hilal_aslan
Active Member II

Re: Add Smart Folder To Site with Rest Api

Thank you so much for reply Cesar Smiley Happy But when I give a new aspect as "smf:systemConfigSmartFolder" with resp api, smart folder is created automatically.

cesarista
Customer

Re: Add Smart Folder To Site with Rest Api

Well, this may be enough for case of a system smart folder smf:systemConfigSmartFolder but if you plan to define and assign a custom template you should use smf:customConfigSmartFolder. The case is slightly different and more general.

Type-based, System, and Custom Smart Folders | Alfresco Documentation 

Regards.

--C.

hilal_aslan
Active Member II

Re: Add Smart Folder To Site with Rest Api

Yes you are right, I want to ask another question to you. When I added smart folder , I can not upload, create a document inside this smart folder as shown below image. It doesn't allow create-upload or any process in smart folder. How can I solve this problem? If you know it, please please help me .

cesarista
Customer

Re: Add Smart Folder To Site with Rest Api

Hi:

A Smart Folder Template is a kind of configuration file that contains one or more queries to define the nodes in a hierarchical tree, like a logical view. Depending on your queries, you may add content in any place of your site (but not inside the smart folder), and this should be reflected under the smart query tree.

Regards.

--C.

hilal_aslan
Active Member II

Re: Add Smart Folder To Site with Rest Api

I get it Cesar , thank you so much..