Hi,
I want to know if there is anyway using which I can programatically determine the node type. For example: while iterating through nodes, I would like to check if a node if of type image and if yes then I want to write some logic.
Thanks in advance,
Ankit
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Ankit.
Use node.getPrimaryNodeType() to get the primary type for the node or use node.isNodeType("Nodetypename") to check if the node is of a certain type.
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Node.html
Good Luck
/Johan
Views
Replies
Total Likes
For an image, jcr:primaryType is dam:Asset while for a page jcr:primaryType is cq:Page.
Views
Replies
Total Likes
Hi Ankit.
Use node.getPrimaryNodeType() to get the primary type for the node or use node.isNodeType("Nodetypename") to check if the node is of a certain type.
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Node.html
Good Luck
/Johan
Views
Replies
Total Likes
Views
Likes
Replies