Entry Settings (entry
)
In the position settings for platen.display.menu
, you can add entries to the site menu.
These settings define how a specific entry is added to the menu.
An entry must define either the feature
or the group
and Entries
settings.
Entries with the feature
setting are individual entries that leverage
a partial defined by a Platen feature.
Entries with the group
setting acommodate a nested list of entries (defined in
entries
) in the menu, using this entry as the parent container.
JSON Schema
Definition
{
"$id": "https://platen.io/modules/platen/config/site/display/menu/entry/schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"if": {
"properties": {
"feature": {
"const": "toroidal"
}
}
},
"then": {
"$ref": "https://platen.io/modules/platen/config/site/display/menu/toroidal/schema.json"
}
}
],
"description": "Defines an entry for the site menu.\n\nhttps://platen.io/modules/platen/config/site/display/menu/entry/",
"properties": {
"entries": {
"description": "Define one or more nested entries to include in a group entry.\n\nhttps://platen.io/modules/platen/config/site/display/menu/entry/#entries",
"items": {
"$ref": "https://platen.io/modules/platen/config/site/display/menu/entry/schema.json"
},
"title": "Nested Entries",
"type": "array"
},
"feature": {
"description": "Specifies the name of the Platen feature this entry should use to write HTML in the menu.\n\nhttps://platen.io/modules/platen/config/site/display/menu/entry/#feature",
"title": "Feature Name",
"type": "string"
},
"group": {
"$ref": "https://platen.io/modules/platen/config/site/display/menu/group/schema.json"
},
"weight": {
"description": "Specifies the weight of the entry in the current level of the site menu.\n\nhttps://platen.io/modules/platen/config/site/display/menu/entry/#weight",
"title": "Entry Weight",
"type": "integer"
}
},
"title": "Entry Settings",
"type": "object"
}
Feature Name (feature
)
Specifies the name of the Platen feature this entry should use to write HTML in the menu. This value must map to the name of a feature that is usable for menu entries. A usable Feature:
- Has
enabled
set totrue
. - Defines a value for
partials.menu
.
If an entry references an unusable or non-existant feature, Hugo raises a warning and skips the entry.
This setting is mandatory if the Group
setting isn’t specified for the entry.
Entry Weight (weight
)
Use this setting to control the where in the menu this entry is added for the current position and level. All weighted entries are added before unweighted modules. Weighted entries are added in order from lowest weight to highest. Unweighted entries are added in alphabetical order.
Group Settings (group
)
You can use this setting to create a nested group of related entries at the current level.
If you define this value, you must also specify one or more entries in entries
.
For more information, see Group Settings
Nested Entries (entries
)
If you define the group
setting for an entry, you must define at least one nested
entry to include in that group with this setting.