diff --git a/es/organize/navigation.mdx b/es/organize/navigation.mdx index c51f4d54a..2cc7ac45c 100644 --- a/es/organize/navigation.mdx +++ b/es/organize/navigation.mdx @@ -135,6 +135,47 @@ Usa la propiedad `expanded` para controlar el estado predeterminado de un grupo } ``` +
+ ### Navegación en árbol +
+ +Usa la propiedad `mode` para mostrar un árbol de navegación en las páginas raíz de grupo. Cuando `mode` se establece en `"tree"`, las páginas raíz muestran automáticamente un listado de sus páginas secundarias y grupos anidados, proporcionando a los usuarios una visión clara del contenido de la sección. + +* `mode: "tree"`: muestra un árbol de navegación en la página raíz del grupo con las páginas secundarias y los grupos anidados. +* `mode: "auto"` o si se omite: usa el comportamiento predeterminado sin árbol de navegación. + +La propiedad `mode` se hereda de forma recursiva. Cuando estableces `mode` en un elemento padre (como el objeto `navigation` raíz, una pestaña, un ancla o un producto), todos los grupos descendientes heredan ese modo. Los descendientes pueden sobrescribir el modo heredado estableciendo su propio valor de `mode`. + +```json +{ + "navigation": { + "groups": [ + { + "group": "Referencia de API", + "root": "api-overview", + "mode": "tree", + "pages": [ + "api-reference/authentication", + { + "group": "Endpoints", + "root": "api-reference/endpoints-overview", + "pages": [ + "api-reference/get", + "api-reference/post", + "api-reference/delete" + ] + } + ] + } + ] + } +} +``` + + + La navegación en árbol requiere una página `root` en el grupo. El árbol de navegación se muestra en la página raíz, listando todas las páginas secundarias y grupos anidados de esa sección. + +
## Tabs
diff --git a/es/organize/settings-structure.mdx b/es/organize/settings-structure.mdx index 29af8e65e..ab3823a1b 100644 --- a/es/organize/settings-structure.mdx +++ b/es/organize/settings-structure.mdx @@ -193,6 +193,10 @@ Consulta [Navegación](/es/organize/navigation) para obtener documentación comp Selector de productos para sitios con múltiples [productos](/es/organize/navigation#products). + + Modo de navegación para todos los grupos y sus descendientes. Establece en `"tree"` para mostrar un árbol de navegación en las páginas raíz de grupo, mostrando las páginas secundarias y los grupos anidados. Se hereda de forma recursiva; los grupos, pestañas, anclas u otros elementos de navegación pueden sobrescribir este valor individualmente. Por defecto: `"auto"`. Ver [Navegación en árbol](/es/organize/navigation#tree-navigation). + + [Grupos](/es/organize/navigation#groups) para organizar el contenido en secciones. diff --git a/fr/organize/navigation.mdx b/fr/organize/navigation.mdx index 77ec47538..b239ef081 100644 --- a/fr/organize/navigation.mdx +++ b/fr/organize/navigation.mdx @@ -135,6 +135,47 @@ Utilisez la propriété `expanded` pour contrôler l’état par défaut d’un } ``` +
+ ### Navigation arborescente +
+ +Utilisez la propriété `mode` pour afficher un arbre de navigation sur les pages racines de groupe. Lorsque `mode` est défini sur `"tree"`, les pages racines affichent automatiquement une liste de leurs pages enfants et groupes imbriqués, offrant aux utilisateurs un aperçu clair du contenu de la section. + +* `mode: "tree"` : affiche un arbre de navigation sur la page racine du groupe, montrant les pages enfants et les groupes imbriqués. +* `mode: "auto"` ou omis : utilise le comportement par défaut, sans arbre de navigation. + +La propriété `mode` est héritée de manière récursive. Lorsque vous définissez `mode` sur un élément parent (comme l'objet `navigation` racine, un onglet, une ancre ou un produit), tous les groupes descendants héritent de ce mode. Les descendants peuvent remplacer le mode hérité en définissant leur propre valeur `mode`. + +```json +{ + "navigation": { + "groups": [ + { + "group": "Référence API", + "root": "api-overview", + "mode": "tree", + "pages": [ + "api-reference/authentication", + { + "group": "Endpoints", + "root": "api-reference/endpoints-overview", + "pages": [ + "api-reference/get", + "api-reference/post", + "api-reference/delete" + ] + } + ] + } + ] + } +} +``` + + + La navigation arborescente nécessite une page `root` sur le groupe. L'arbre de navigation est affiché sur la page racine, listant toutes les pages enfants et groupes imbriqués de cette section. + +
## Tabs
diff --git a/fr/organize/settings-structure.mdx b/fr/organize/settings-structure.mdx index b5a747317..6eebccd12 100644 --- a/fr/organize/settings-structure.mdx +++ b/fr/organize/settings-structure.mdx @@ -193,6 +193,10 @@ Voir [Navigation](/fr/organize/navigation) pour la documentation complète sur l Sélecteur de produits pour les sites avec plusieurs [produits](/fr/organize/navigation#products). + + Mode de navigation pour tous les groupes et leurs descendants. Définissez sur `"tree"` pour afficher un arbre de navigation sur les pages racines des groupes, montrant les pages enfants et les groupes imbriqués. S'hérite de manière récursive ; les groupes, onglets, ancres ou autres éléments de navigation peuvent remplacer cette valeur individuellement. Par défaut : `"auto"`. Voir [Navigation arborescente](/fr/organize/navigation#tree-navigation). + + [Groupes](/fr/organize/navigation#groups) pour organiser le contenu en sections. diff --git a/organize/navigation.mdx b/organize/navigation.mdx index 6fc54db94..14c8c5a11 100644 --- a/organize/navigation.mdx +++ b/organize/navigation.mdx @@ -141,6 +141,67 @@ Use the `expanded` property to control the default state of a nested group in th } ``` +### Tree navigation + +Use the `mode` property to display a navigation tree on group root pages. When `mode` is set to `"tree"`, root pages automatically render a listing of their child pages and nested groups, giving users a clear overview of the section's content. + +- `mode: "tree"`: Renders a navigation tree on the group's root page showing child pages and child groups. +- `mode: "auto"` or omitted: Uses the default behavior with no navigation tree. + +The `mode` property inherits recursively. When you set `mode` on a parent element (such as the root `navigation` object, a tab, an anchor, or a product), all descendant groups inherit that mode. Descendants can override the inherited mode by setting their own `mode` value. + +```json +{ + "navigation": { + "groups": [ + { + "group": "API reference", + "root": "api-overview", + "mode": "tree", + "pages": [ + "api-reference/authentication", + { + "group": "Endpoints", + "root": "api-reference/endpoints-overview", + "pages": [ + "api-reference/get", + "api-reference/post", + "api-reference/delete" + ] + } + ] + } + ] + } +} +``` + +You can also set `mode` at higher levels of the navigation hierarchy to apply tree navigation across all groups: + +```json +{ + "navigation": { + "mode": "tree", + "tabs": [ + { + "tab": "Documentation", + "groups": [ + { + "group": "Getting started", + "root": "quickstart", + "pages": ["installation", "configuration"] + } + ] + } + ] + } +} +``` + + + Tree navigation requires a `root` page on the group. The navigation tree is rendered on the root page, listing all child pages and nested groups in that section. + + ## Tabs Tabs create distinct sections of your documentation with separate URL paths. Tabs create a horizontal navigation bar at the top of your documentation that lets users switch between sections. diff --git a/organize/settings-structure.mdx b/organize/settings-structure.mdx index 2dabbbccf..9868be201 100644 --- a/organize/settings-structure.mdx +++ b/organize/settings-structure.mdx @@ -193,6 +193,10 @@ See [Navigation](/organize/navigation) for complete documentation on building yo Product switcher for sites with multiple [products](/organize/navigation#products). + + Navigation mode for all groups and their descendants. Set to `"tree"` to render a navigation tree on group root pages, showing child pages and nested groups. Inherits recursively; individual groups, tabs, anchors, or other navigation elements can override this value. Defaults to `"auto"`. See [Tree navigation](/organize/navigation#tree-navigation). + + [Groups](/organize/navigation#groups) for organizing content into sections. diff --git a/zh/organize/navigation.mdx b/zh/organize/navigation.mdx index f44a6df0f..82da59f4c 100644 --- a/zh/organize/navigation.mdx +++ b/zh/organize/navigation.mdx @@ -135,6 +135,47 @@ keywords: ["导航结构", "侧边栏配置", "页面组织", "导航分组"] } ``` +
+ ### 树状导航 +
+ +使用 `mode` 属性在分组根页面上显示导航树。当 `mode` 设置为 `"tree"` 时,根页面会自动渲染其子页面和嵌套分组的列表,为用户提供该部分内容的清晰概览。 + +* `mode: "tree"`:在分组的根页面上渲染导航树,显示子页面和嵌套分组。 +* `mode: "auto"` 或省略:使用默认行为,不显示导航树。 + +`mode` 属性会递归继承。当你在父元素(如根 `navigation` 对象、选项卡、锚点或产品)上设置 `mode` 时,所有后代分组都会继承该模式。后代可以通过设置自己的 `mode` 值来覆盖继承的模式。 + +```json +{ + "navigation": { + "groups": [ + { + "group": "API 参考", + "root": "api-overview", + "mode": "tree", + "pages": [ + "api-reference/authentication", + { + "group": "接口", + "root": "api-reference/endpoints-overview", + "pages": [ + "api-reference/get", + "api-reference/post", + "api-reference/delete" + ] + } + ] + } + ] + } +} +``` + + + 树状导航需要分组设置 `root` 页面。导航树会在根页面上渲染,列出该部分中的所有子页面和嵌套分组。 + +
## 选项卡
diff --git a/zh/organize/settings-structure.mdx b/zh/organize/settings-structure.mdx index 5cfcf5c07..136b7ece3 100644 --- a/zh/organize/settings-structure.mdx +++ b/zh/organize/settings-structure.mdx @@ -193,6 +193,10 @@ import IconsOptional from "/snippets/zh/icons-optional.mdx"; 多[产品](/zh/organize/navigation#products)站点的产品切换器。 + + 所有分组及其后代的导航模式。设置为 `"tree"` 可在分组根页面上渲染导航树,显示子页面和嵌套分组。递归继承;各分组、选项卡、锚点或其他导航元素可单独覆盖此值。默认值:`"auto"`。请参阅[树状导航](/zh/organize/navigation#tree-navigation)。 + + 用于将内容组织成部分的[组](/zh/organize/navigation#groups)。