| 1 |
--- |
| 2 |
_comment: Do not remove front matter. |
| 3 |
--- |
| 4 |
|
| 5 |
An ordered taxonomy is a slice, where each element is an object that contains the term and a slice of its weighted pages. |
| 6 |
|
| 7 |
Each element of the slice provides these methods: |
| 8 |
|
| 9 |
`Count` |
| 10 |
: (`int`) Returns the number of pages to which the term is assigned. |
| 11 |
|
| 12 |
`Page` |
| 13 |
: (`page.Page`) Returns the term's `Page` object, useful for linking to the term page. |
| 14 |
|
| 15 |
`Pages` |
| 16 |
: (`page.Pages`) Returns a `Pages` object containing the `Page` objects to which the term is assigned, sorted by [taxonomic weight](g). To sort or group, use any of the [methods][] available to the `Pages` object. For example, sort by the last modification date. |
| 17 |
|
| 18 |
`Term` |
| 19 |
: (`string`) Returns the term name. |
| 20 |
|
| 21 |
`WeightedPages` |
| 22 |
: (`page.WeightedPages`) Returns a slice of weighted pages to which the term is assigned, sorted by taxonomic weight. The `Pages` method above is more flexible, allowing you to sort and group. |
| 23 |
|
| 24 |
[methods]: /methods/pages/ |