cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Share list all sites in a dashlet

leyer
Champ in-the-making
Champ in-the-making
Hello everyone.
I try to create a new dashlet in alfresco share but I encounter a problem …
In fact in my dashlet i want  to list all sites even if the site is not a site of the connected user.

In the my site dashlet the query is :
remote.call("/api/people/" + stringUtils.urlEncode(user.name) + "/sites");

And i need something like this :

remote.call("/api/sites");

thanks in advance
3 REPLIES 3

zaizi
Champ in-the-making
Champ in-the-making
What version of Alfresco are you using?

You can just make the other Sites (the ones not connected to the user) as public (with or without moderated membership) it will list all the sites.

If you want to list private sites as well, just create an Alfresco webscript to list all the sites and call that.

jjacobwip
Champ in-the-making
Champ in-the-making
I know its an old post, but I am trying to implement something similar in Share. I want to display all Public sites in "My Sites" along with the other sites the user created or explicitly joined as a member (for some reason, public sites that the user has not joined are not getting listed in "My Sites"). Is it possible to do it with any existing WebScripts or do we have to write out own.

Hi,

I'm afraid you will need yo write your own REST service, as wit with "/api/sites" you get all the sites in the system and I understand it doesn't meet your requirements. You could also deal with the JSON response to do what you need to do, but I wouldn't consider that a clean solution. It's all your choice, consider your requirements, time and technical knowledge.

By the way, perhaps you find useful the following links:

http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference (slightly oudated for Alfresco 4)
http://wiki.alfresco.com/wiki/4.0_JavaScript_Services_API
http://wiki.alfresco.com/wiki/4.0_JavaScript_API

I would also suggest you to create a new topit if you are going to go ahead, avoiding this way this thread goes out of topic.

Regards.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.