Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design authored Jul 16, 2018
1 parent d58d507 commit 80c48d0
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ For more fine-grained control over the navigation output, you can call nodes dir
</ul>
```

### Node attributes
## Node attributes

You have access to the following attributes on navigation nodes. These are also available when querying node elements.

### Parameters
#### Parameters

| Parameter | Explanation |
| --------- | ----------- |
Expand All @@ -114,7 +114,21 @@ You have access to the following attributes on navigation nodes. These are also
| newWindow | Whether this node should open in a new window. |
| active | Whether the URL matches the current URL. |
| nav | The navigation model this node belongs to. |
| status | The current status of the node. |
| children | A collection of child nodes (if any). |

## Node queries

As nodes are just elements, you can query nodes as per your needs. See [Element Queries](https://docs.craftcms.com/v3/dev/element-queries/#creating-element-queries) and [Entry Queries](https://docs.craftcms.com/v3/dev/element-queries/entry-queries.html).

Some common query parameters:

#### Parameters
| Parameter | Explanation |
| --------- | ----------- |
| hasDescendants | Whether the current node has any children |
| level | The level in the navigation structure this node belongs to. |
| status | The current status of the node. |

## Developers

Expand Down

0 comments on commit 80c48d0

Please sign in to comment.