Template:MM/doc: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''{{tlx|{{PAGENAME}}}}''' is a template that creates a human-readable link from the true page name of a ''[[Myth Makers]]'' page. Out of necessity, the most economical way to name a page about a particular ''Myth Makers'' page is to follow [[T:NO TITLE]] and make it in the following form:<pre>MM media #</pre> | '''{{tlx|{{PAGENAME}}}}''' is a template that creates a human-readable link from the true page name of a ''[[Myth Makers]]'' page. Out of necessity, the most economical way to name a page about a particular ''Myth Makers'' page is to follow [[T:NO TITLE]] and make it in the following form:<pre>MM media #</pre> | ||
So, we end up with [[MM VHS 3]] and [[MM DVD 7]]. That keeps the pages straight, but it may not be the most human-friendly thing in the world. | So, we end up with [[MM VHS 3]] and [[MM DVD 7]]. That keeps the pages straight, but it may not be the most human-friendly thing in the world. | ||
== General usage == | |||
If we instead type {{tt|<nowiki>{{MM|VHS 3}}</nowiki>}}, we'll get {{MM|VHS 3}}, a link on the name of the person who's the subject of that volume. | |||
If you want to change the name of the link, simply enter that other name as the second parameter. Hence, {{tt|<nowiki>{{MM|VHS 1|the Michael Wisher ''Myth Makers'' interview}}</nowiki>}} results in {{MM|MM VHS 1|the Michael Wisher ''Myth Makers'' interview}}. | If you want to change the name of the link, simply enter that other name as the second parameter. Hence, {{tt|<nowiki>{{MM|VHS 1|the Michael Wisher ''Myth Makers'' interview}}</nowiki>}} results in {{MM|MM VHS 1|the Michael Wisher ''Myth Makers'' interview}}. | ||
Note that you ''can'' include the full page name if you want; {{tlx|MM|DVD 1}} and {{tlx|MM|MM DVD 1}} have the same effect. | Note that you ''can'' include the full page name if you want; {{tlx|MM|DVD 1}} and {{tlx|MM|MM DVD 1}} have the same effect. | ||
== Template usage == | |||
In most template usage, you won't like the fact that the template returns a ''link'' to a page. You'd probably rather have plain text. In order to get that, you'll have to use a bit of string function magic: | |||
<pre> | |||
{{#sub:{{MM|{{{whatever variable}}}}}|2|-2}} | |||
</pre> | |||
This neatly snips the brackets off of the results of {{tt|<nowiki>{{ MM| {{{whatever variable}}} }}</nowiki>}}. | |||
<noinclude>[[category:template documentation|{{PAGENAME}}]]</noinclude> | <noinclude>[[category:template documentation|{{PAGENAME}}]]</noinclude> |
Latest revision as of 14:43, 8 January 2014
{{MM/doc}} is a template that creates a human-readable link from the true page name of a Myth Makers page. Out of necessity, the most economical way to name a page about a particular Myth Makers page is to follow T:NO TITLE and make it in the following form:
MM media #
So, we end up with MM VHS 3 and MM DVD 7. That keeps the pages straight, but it may not be the most human-friendly thing in the world.
General usage[[edit source]]
If we instead type {{MM|VHS 3}}, we'll get Nicholas Courtney, a link on the name of the person who's the subject of that volume.
If you want to change the name of the link, simply enter that other name as the second parameter. Hence, {{MM|VHS 1|the Michael Wisher ''Myth Makers'' interview}} results in the Michael Wisher Myth Makers interview.
Note that you can include the full page name if you want; {{MM|DVD 1}} and {{MM|MM DVD 1}} have the same effect.
Template usage[[edit source]]
In most template usage, you won't like the fact that the template returns a link to a page. You'd probably rather have plain text. In order to get that, you'll have to use a bit of string function magic:
{{#sub:{{MM|{{{whatever variable}}}}}|2|-2}}
This neatly snips the brackets off of the results of {{ MM| {{{whatever variable}}} }}.