SiteVision Onlinehelp
Search

How do I get the ID on a JCR-node?

Question: How do I get the ID on a JCR-node?
Answer: Invoke the getIdentifier method on the Node. The following script shows how you list the ID on all nodes in the first level including the website:

var util = request.getAttribute("sitevision.utils");
var site = util.getResourceLocatorUtil().getSitePage();

for(var nodes = site.getNodes(); nodes.hasNext();)
{
    var node = nodes.next();
    out.println(node.getIdentifier() + "<br />");
}

Last updated:

se-sto-pio-sv5-1.sitevision-cloud.net
18.224.95.38