ScalarNode
Methods
| Method | Type | Description |
|---|---|---|
| getDisplayTitle( removeMarkup ) | string | Returns the title of the node, formatted for display. If the removeMarkup parameter is true, HTML markup will be removed from the title. |
| getDominantScalarType() | object | Returns an object literal describing the most specialized type associated with the node— for example: while every path is also a page, this method will only return the “path” object for nodes that are paths. |
| getRelatedNodes( type, direction, [includeNonPages], [sort] ) | array | Returns an array of ScalarNode objects related to the node by the specified criteria. Method parameters:
|
| getRelations( type, direction, [sort], [includeNonPages] ) | array | Returns an array of ScalarRelation objects related to the node by the specified criteria. Method parameters:
|
| getSortTitle() | string | Returns the title of the node, formatted for alphabetical sorting (i.e. with initial non-alphabetic components like the word “the” removed). Normally used for internal processing of arrays of nodes. |
| hasScalarType( typeName ) | boolean | Returns true if any of the Scalar types associated with the node match the specified type name. |
Properties
| Property | Type | Description |
|---|---|---|
| color | string | The HTML color associated with this node. |
| current | ScalarVersion | The most current known ScalarVersion associated with the node. |
| data | object | The raw JSON data for the node. |
| defaultView | string | The name of the default view associated with this node. |
| incomingRelations | array | An array of ScalarRelation objects describing the node’s incoming relationships. |
| outgoingRelations | array | An array of ScalarRelation objects describing the node’s outgoing relationships. |
| properties | object | All known properties associated with the node. |
| scalarTypes | array | An array of objects describing all of the Scalar types this node is a member of. |
| slug | string | The unique URI segment that identifies the node within the current book. |
| thumbnail | string | The URL of the thumbnail image associated with this node. |
| url | string | The URL of the node. |
| versions | array | An array of all known ScalarVersions associated with the node. |
This page has paths:
- Scalar API JavaScript library reference Erik Loyer