Difference between revisions of "Help:Templates/ML"
(Initial attempt) |
(replace <pre> around example code with <blockquote><nowiki>; put generated examples within <blockquote>; add line-breaks for readability; link to template under see also header) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
The first is the most simple: | The first is the most simple: | ||
< | <blockquote><nowiki>{{ ML |topicid }}</nowiki></blockquote> | ||
...which will result in: | ...which will result in: | ||
{{ML |topicid}} | |||
<blockquote>{{ML |topicid}}</blockquote> | |||
The second can be used by adding... | The second can be used by adding... | ||
< | |||
<blockquote><nowiki>type=normal</nowiki></blockquote> | |||
...to the template, as so: | ...to the template, as so: | ||
< | |||
<blockquote><nowiki>{{ML |topicid | type=normal}}</nowiki></blockquote> | |||
...which will result in: | ...which will result in: | ||
{{ML |topicid | type=normal}} | |||
<blockquote>{{ML |topicid | type=normal}}</blockquote> | |||
The latter "normal" type (which derives from CSS' ''font-size: normal'' attribute) can take a further unnamed argument to modify the link's text, as so: | The latter "normal" type (which derives from CSS' ''font-size: normal'' attribute) can take a further unnamed argument to modify the link's text, as so: | ||
< | |||
<blockquote><nowiki>{{ML |topicid | type=normal | this link has an invalid topic ID}}</nowiki></blockquote> | |||
...which will print: | ...which will print: | ||
Note the lack of a space in all forms before ''topicid''. This is a limitation of the template— space is usually preferred for | <blockquote>{{ML |topicid | type=normal | this link has an invalid topic ID}}</blockquote> | ||
Note the lack of a space in all forms before ''topicid''. This is a limitation of the template— space is usually preferred for readability's sake, but in this case it would cause a gap between the URL and the ID, so it is necessary to leave out. "Patches welcome"! | |||
==Rationale== | ==Rationale== | ||
Line 30: | Line 40: | ||
The URL has been changed twice. The first was the change from invictus.softmeg.com to muselive.com, the second when URLs lacking a www prefix started redirecting to URLs with a www prefix. This template would have been ideal had it been used ubiquitously by then. | The URL has been changed twice. The first was the change from invictus.softmeg.com to muselive.com, the second when URLs lacking a www prefix started redirecting to URLs with a www prefix. This template would have been ideal had it been used ubiquitously by then. | ||
==See also== | |||
*[[Template:ML]] | |||
{{Backto | Help:Templates | template help}} | {{Backto | Help:Templates | template help}} | ||
[[Category:Template help]] | [[Category:Template help]] |
Latest revision as of 22:04, 22 August 2009
This template is for linking to Muselive.com. There are three forms it can take, which can be used depending on needs.
The first is the most simple:
{{ ML |topicid }}
...which will result in:
(download)
The second can be used by adding...
type=normal
...to the template, as so:
{{ML |topicid | type=normal}}
...which will result in:
The latter "normal" type (which derives from CSS' font-size: normal attribute) can take a further unnamed argument to modify the link's text, as so:
{{ML |topicid | type=normal | this link has an invalid topic ID}}
...which will print:
Note the lack of a space in all forms before topicid. This is a limitation of the template— space is usually preferred for readability's sake, but in this case it would cause a gap between the URL and the ID, so it is necessary to leave out. "Patches welcome"!
Rationale
There are two benefits for using a template to link to Muselive:
- Style and structure is separate from information, thus:
- It is somewhat more future proof.
- The URL form is easily updateable from the ML template, thus:
- It is somewhat more future proof.
The URL has been changed twice. The first was the change from invictus.softmeg.com to muselive.com, the second when URLs lacking a www prefix started redirecting to URLs with a www prefix. This template would have been ideal had it been used ubiquitously by then.