Terms
For a given taxonomy, renders a list of terms assigned to the page or site.
Location : layouts/_partials/widgets/terms.html
Parameters :
| Parameter | Type | Description | Default |
|---|---|---|---|
taxonomy | string | The taxonomy name (e.g., "tags", "categories") | required |
page | Page | Page context (for page terms) | - |
site | Site | Site context (for all terms) | - |
taxonomyFrom | string | Source: "page" or "site" | "page" |
class | string | Additional CSS classes | - |
key | string | Config key for visibility | taxonomy name |
Configuration :
yaml
params:
showTags: true # Show/hide tags
showTagsCount: true # Show/hide tag count
showCategories: true # Show/hide categories
showCategoriesCount: true # Show/hide category countExamples :
go
// Page tags
{{ partial "widgets/terms.html" (dict "taxonomy" "tags" "page" .) }}
// All site tags
{{ partial "widgets/terms.html" (dict
"taxonomy" "tags"
"site" .Site
"taxonomyFrom" "site"
) }}
// Categories with custom class
{{ partial "widgets/terms.html" (dict
"taxonomy" "categories"
"page" .
"class" "post-cats"
) }}
// Without count
{{ partial "widgets/terms.html" (dict
"taxonomy" "tags"
"page" .
"key" "tags"
) }}