AnsweredAssumed Answered

Sites

Question asked by riadhazzouz on Mar 22, 2019
Latest reply on Mar 25, 2019 by riadhazzouz

Is there a way to find out if a site has been created ?

 

I wrote this behaviour 

 

@Override
public void onCreateNode(ChildAssociationRef childAssocRef) {
NodeRef nodeRef = childAssocRef.getChildRef();

String nodeName = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
System.out.println(nodeName );
// IMPLEMENTATION
}

 

this is the output :
page.title.site~site1~dashboard.xml

 

page.navigation.site~site1~dashboard.xml
page.component-1-1.site~site1~dashboard.xml

 

page.component-2-1.site~site1~dashboard.xml
page.component-2-2.site~site1~dashboard.xml

 

every time I create a site, I find 3 nodeNames in the console.
But I can't tell if it's a site which has been created.

Outcomes