Display nodes under a component
Hi,
I would like to do ask how can I display nodes that are copied over like parsys does.
String nodePath = properties.get("./nodePath",String.class); String nodeWidth = properties.get("./nodeWidth",String.class); String nodeHeight = properties.get("./nodeHeight",String.class); if(nodePath!= null){ //get referring node resources Resource r = resourceResolver.getResource(nodePath); Node referringNode = r.adaptTo(Node.class); String[] temp = nodePath.split("/"); String referringName = temp[temp.length-1]; Node contentNode = currentNode.addNode("content"); contentNode.setPrimaryType("cq:PageContent"); contentNode.setProperty("sling:resourceSuperType", "foundation/components/page"); JcrUtil.copy(referringNode, contentNode, referringName); contentNode.getSession().save(); currentNode.getSession().save(); } else{ %><p>Right-click to make changes. Settings cannot be changed. If needed changes, then delete and add component again</p><% }Basically, my component shows a dialog which allows me to select a node which will be copied over to a specific page. The problem is it only shows when the copied node is placed under par (parsys) and does not show when it is under my component. This is because I need the dialog box to surround the child nodes. I have tried using another parsys and as above I am using page component, but the ticker tape (image below) is not showing. Is there anyway to do this? Or will I just have to stick with using parsys as the parent component?
[img]Screen Shot 2015-09-23 at 5.58.55 pm.png[/img]