Finn
Finn

Reputation: 952

How to get current site details in alfresco repository?

I am trying to get current site name in alfresco repository side webscript. I tried a couple of ways.

page.url.templateArgs.site - //it wont work as its share side stuff.

Do anyone has any idea on this?

Regards.

Upvotes: 0

Views: 1397

Answers (2)

Jeff Potts
Jeff Potts

Reputation: 10538

Your question said you are in a repository tier web script. The repository has a service called SiteService. The SiteService allows you, among other things, to fetch a site by its ID. The getSite() method returns a Site object. Learn more about the SiteService and the Site object in the documentation.

Upvotes: 3

alex
alex

Reputation: 774

Alfresco Repository Webscripts Root Objects won't give you that. You will get this from the Surf based Alfresco Share Root Objects

Upvotes: 1

Related Questions