Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'

This commit is contained in:
Bjørn Erik Pedersen
2025-04-10 13:04:51 +02:00
987 changed files with 12379 additions and 14083 deletions

View File

@@ -3,23 +3,21 @@ title: Alphabetical
description: Returns an ordered taxonomy, sorted alphabetically by term.
categories: []
keywords: []
action:
related:
- methods/taxonomy/ByCount
returnType: page.OrderedTaxonomy
signatures: [TAXONOMY.Alphabetical]
toc: true
params:
functions_and_methods:
returnType: page.OrderedTaxonomy
signatures: [TAXONOMY.Alphabetical]
---
The `Alphabetical` method on a `Taxonomy` object returns an [ordered taxonomy](g), sorted alphabetically by [term](g).
While a `Taxonomy` object is a [map](g), an ordered taxonomy is a [slice](g), where each element is an object that contains the term and a slice of its [weighted pages](g).
{{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
{{% include "/_common/methods/taxonomy/get-a-taxonomy-object.md" %}}
## Get the ordered taxonomy
Now that we have captured the “genres” Taxonomy object, lets get the ordered taxonomy sorted alphabetically by term:
Now that we have captured the “genres” Taxonomy object, let's get the ordered taxonomy sorted alphabetically by term:
```go-html-template
{{ $taxonomyObject.Alphabetical }}
@@ -37,7 +35,7 @@ To inspect the data structure:
<pre>{{ debug.Dump $taxonomyObject.Alphabetical }}</pre>
```
{{% include "methods/taxonomy/_common/ordered-taxonomy-element-methods.md" %}}
{{% include "/_common/methods/taxonomy/ordered-taxonomy-element-methods.md" %}}
## Example