You are here

hasAspect

hasAspect(type) returns true if an aspect was applied to the node.

Parameters

type
The type of aspect whose presence will be checked for. Examples include cm:versionable and cm:templatable.

Returns

Boolean

Example

var isTemplatable = document.hasAspect("cm:templatable");
...
var node = companyhome.childByNamePath("TEST_FILE_0.TXT");
model.result = node.hasAspect("cm:versionable");

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.