Template:Navbox/doc: Difference between revisions
Template page
More actions
fandomwiki>@DeletedUser40302604 m 1 revision imported |
Koza1brada (talk | contribs) m 3 revisions imported: Try to import fandom pages (manual dump, 9) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 73: | Line 73: | ||
:* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>V • T • E</small> links). | :* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>V • T • E</small> links). | ||
:* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden. | :* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden. | ||
: To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside < | : To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside <code><noinclude|></code>...<code></noinclude|></code> tags. This setting will force the box visible when standalone (even when followed by other boxes), displaying "[hide]", but then it will auto-collapse the box when stacked inside an article: | ||
:: <code><nowiki>| state = </nowiki></code>< | :: <code><nowiki>| state = </nowiki></code><code><noinclude|></code>expanded<code></noinclude|></code> | ||
: Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this: | : Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this: | ||
:* In your intermediate template, create a parameter also named "state" as a pass-through like this: | :* In your intermediate template, create a parameter also named "state" as a pass-through like this: | ||
:: <code><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></code> | :: <code><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></code> | ||
:* The < | :* The <code><includeonly></code><code>|</code> will make the template expanded when viewing the template page by itself. | ||
:; ''navbar'' | :; ''navbar'' | ||
:: If set to <code>plain</code>, the <span style="font-size: 88%;">V • T • E</span> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <span style="font-size: 88%;">V • T • E</span> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages. | :: If set to <code>plain</code>, the <span style="font-size: 88%;">V • T • E</span> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <span style="font-size: 88%;">V • T • E</span> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages. | ||
:; ''border'' | :; ''border'' | ||
{{doc/end}} | {{doc/end}} | ||