Cómo usar las barras laterales de navegación

This translation is incomplete. Please help translate this article from English

Esta página no está completa.

La navegación en MDN se realiza frecuentemente usando barras laterales que listan otros artículos en una serie así como contenido relacionado tanto en la misma suite de documentación como en otras áreas de MDN. Las barras laterales de MDN no se crean automáticamente; para incluirlas en la página, es necesario crear y utilizar una macro de algún tipo. En este artículo, revisaremos el proceso de creación de las macros de MDN en la barra lateral y cómo utilizarlas en un artículo.

Macros actuales de las barras laterales de MDN

MDN ya tiene varias macros para crear barras laterales. La mayoría son específicas para secciones particulares de MDN, mientras que otras tienen la intención de crear barras laterales genéricas para áreas de documentación que de otra manera no tendrían ninguna.

Inserts a sidebar for navigating the add-ons documentation; this is primarily content about creating browser extensions.
Inserts a sidebar used within API interface reference pages and subpages.
Inserts a sidebar used within the HTML/DOM Canvas documentation.
Inserts a default sidebar that can be used on the API overview page of an API that doesn't have its own sidebar type.
Inserts a sidebar used on the documentation that's specific to Firefox.
Inserts a sidebar for navigating MDN's content about developing games using web technologies.
Inserts the sidebar used within MDN's HTML documentation.
Inserts a sidebar for use on pages within MDN's HTTP documentation.
Inserts a sidebar for use within the JavaScript documentation.
Inserts the Learning Area sidebar.
Inserts a sidebar for navigating MDN's "meta-documentation;" that is, documentation about using and editing the MDN Web Docs site itself. You can actually see that macro in use on this page.
Inserts a sidebar for use within documentation about Service Workers.
Inserts a sidebar for use on pages documenting SpiderMonkey, Mozilla's JavaScript engine.
Inserts a sidebar listing pages about Firefox developer tools.
Inserts a sidebar containing links related to WebAssembly.
Inserts a sidebar used to navigate the API reference documentation about browser e3dtensions (WebExtensions).
Inserts a sidebar that provides navigation of WebGL-related content.
Inserts a sidebar whose contents provide navigation of WebRTC documentation on MDN.
Inserts a sidebar with documentation for XSLT, EXSLT and XPath.

Using sidebars

To add a sidebar to a page, find the right macro, then, on the page on to which you want to insert the sidebar, click the "Edit" button. Add to the page a <p> block whose contents are simply the call to the macro. Once there, you can add the macro call. Typically, sidebar macros don't require any parameters, so you can just do, for example:


Usually, you should do this as the first line of the document. In some documents, it's been done at the bottom instead. This works fine, but for the sake of consistency, try to place it at the top.

If there's already a <p> block with macro calls at the top of the page, such as those that create banners like {{Non-standard_Header}}, you can put the sidebar macro inside the same <p>, like this:


Creating sidebars

details coming

Talk about SidebarUtilities.

There are some macros that can be used to help build sidebars:

Creates a tree of links structured for use in a sidebar, using the subpages of the specified page.