Template:MSNav/doc

From Wikipedia, the free encyclopedia

This is a documentation subpage for Template:MSNav (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

This is a master template that houses all Microsoft Navigation templates. All but one is in collapsed state. This template takes a parameter open, the value of which is the title of the template which is to be kept uncollapsed. If the parameter is not specified, all templates will be in collapsed state.

Contents

[edit] Usage

The template is to be used as

{{MSNav|open = Template Title}}

where Template Title can be one of:

[edit] Example

{{DotNET}}
{{MSNav|open = DotNET}}

[edit] Adding templates

To prepare a template for use here, make sure it accepts a state parameter, and the template opens on the open. Simplest way is to use the {{Navbox}} template, and surface a state parameter, and pass it on to {{navbox}} using {{{state|autocollapse}}}. Add the template to the list here, using the {{MSNav/Container}} template, and pass on the open parameter, like {{MSNav/Container|template=Name of the template you want to add|open={{{open|}}}}}

[edit] Using individual templates

It is also possible to not use all the navigation templates here, but a subset of them and still want to leave some collapsed and some open. For that case, use the individual templates, with an unnamed parameter. For the template(s) that is/are to be kept opened, use state=open.