How to get the noderef of the sites using sitename?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
madhu_sudireddy
Active Member

How to get the noderef of the sites using sitename?

Jump to solution

Is there any web url for this?

1 Solution

Accepted Solutions
vidhipanchal
Established Member

Re: How to get the noderef of the sites using sitename?

Jump to solution

Hi,

You can use the 'SiteService' (Java API) to get noderef and other detalis of site by site's shortName as below: 

SiteInfo site = serviceRegistry.getSiteService().getSite("test");
NodeRef siteNode = site.getNodeRef();

This Link provides more information to you about siteServices.

As well as you can use Javascript API for getting noderef of site

var site = siteService.getSite("jncasr");
var siteNodeRef = site.getNode().getNodeRef();

Regards,

Vidhi

ContCentric

View solution in original post

1 Reply
vidhipanchal
Established Member

Re: How to get the noderef of the sites using sitename?

Jump to solution

Hi,

You can use the 'SiteService' (Java API) to get noderef and other detalis of site by site's shortName as below: 

SiteInfo site = serviceRegistry.getSiteService().getSite("test");
NodeRef siteNode = site.getNodeRef();

This Link provides more information to you about siteServices.

As well as you can use Javascript API for getting noderef of site

var site = siteService.getSite("jncasr");
var siteNodeRef = site.getNode().getNodeRef();

Regards,

Vidhi

ContCentric

View solution in original post