documentLibrary not visible after creating site in Alfresco Share

803 Views Asked by At

I have a problem identifying the root folder documentLibrary after creating a new site. I'm using a POST command to create a new site (to service/modules/create-site) and everything looks fine, the site is there. However, listing the folders show that there is no defaultLibrary. I need its ID in order to create new folders on the site visible on the web pages of Alfresco share.

My impression is that the documentLibrary is only created when you access for the first time the site on the web. Any ideas?

Thanks

EDIT: the correct name is documentLibrary

2

There are 2 best solutions below

3
On

You are correct. The documentLibrary is created on the first access. You can use the siteService.getContainer method in the javascript services API. It will create the container if it does not exist: http://wiki.alfresco.com/wiki/4.0_JavaScript_Services_API#Get_container_folder_for_component_id

I think the correct naming of the componentId is documentLibrary.

0
On

I had the same problem. I solved it by creating a folder for the template i use in Data Dictionary/Space Templates Then the documentlibrary is created.