Difference between revisions of "Template:Alternative/doc"
Jump to navigation
Jump to search
blackwiki>WOSlinker (update docs) |
blackwiki>Mclay1 m (moved Template:Alternate/doc to Template:Alternative/doc) |
(No difference)
| |
Revision as of 13:28, 23 December 2010
| 40px | This is a documentation subpage for Template:Alternative. It contains usage information, categories and other content that is not part of the original template page. |
This template must be substituted.
Contents
Usage
This template is used to add an alternate option to an existing template. Once this template is used, the alternate option will be available by setting the alt parameter equal to yes. (|alt=yes).
Parameters
- Default: The information to be displayed when the
altparameter is omitted or set to anything but yes. - Alternate: The information to be used when the
altparameter is set to yes.
Examples
In order to use this template, it must be substed into another. For this example, that will be Template:Alternate/example. First, one would type the following code into that page:
Bob said "{{subst:alternate|default=hello|alternate=goodbye}}."
After the page is saved, the page's code would read:
Bob said "{{#ifeq:{{{alt}}}|yes|goodbye|hello}}."
Then, when transcluding that page without the alt option (typed as {{Alternate/example}}), the following text would be displayed:
Or, when transcluding with alt=yes (typed as {{Alternate/example|alt=yes}}, one would recieve:
See also
- The similar {{barnalt}} template.