Template:Menu
Appearance
This documentation is transcluded from Template:Menu/doc.
This template creates a navigation menu for your user page. It is based on FlexiMenu from the German Wikipedia and Меню from Russian Wikipedia. Each individual button is rendered using the subtemplate {{Menu/Button}}.
Usage
[edit]Create a subpage at Special:MyPage/Menu and insert the template there:
{{Menu
| user = {{subst:REVISIONUSER}}
| hide link = yes
| finalize = <noinclude>yes</noinclude>
| USER|TALK|CONTRIBS|/Sandbox|SUBPAGES}}
Then, on your user pages:
- At the top, add:
{{User:{{subst:REVISIONUSER}}/Menu}}
- At the bottom, add:
{{Menu|end=yes}}
Parameters
[edit]- hide link — Hides the link to the main user page on its subpages. Set to no or omit to disable hiding. Used on the `/Menu` subpage.
- finalize — Used to close the menu frame. Helps with demo or documentation. Used only on `/Menu`.
- end — Closes the menu frame without rendering any menu buttons. Use at the bottom of user pages.
Features
[edit]To activate most features, define the user parameter.
- If the value of a button is one of the keywords:
USER, TALK, CONTRIBS, or SUBPAGES, it links to the respective page.
- If a button starts with a slash (`/`), it links to a user subpage (e.g., `/Sandbox`).
Example
[edit]USER | TALK | CONTRIBS | Sandbox | SUBPAGES | ||||||||||
| Page content goes here | ||||||||||||||
{{Menu
| user = {{subst:REVISIONUSER}}
| hide link = yes
| finalize = <noinclude>yes</noinclude>
| USER|TALK|CONTRIBS|/Sandbox|SUBPAGES}}
Limitations
[edit]- Supports up to 10 buttons.
- Hiding the main link may not work consistently in all browsers.
- Extra spaces or line breaks may affect layout rendering.