Template:Editor: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
m (repl three  's with "   ")
(add {{{edtype|Editor}}}, so that optionally, for instance, edtype=Contributor causes "Editor"(s) to be replaced by "Contributor"(s))
Line 1: Line 1:
{{switch|{{{1}}}
{{switch|{{{1}}}
|case: 2=:'''Editors:''' [[User:{{{2}}}|{{{2}}}]] and [[User:{{{3}}}|{{{3}}}]] ''(added {{{4}}})''. &nbsp; <includeonly>[[Category:{{{4}}}]]</includeonly>
|case: 2=:'''{{{edtype|Editor}}}s:''' [[User:{{{2}}}|{{{2}}}]] and [[User:{{{3}}}|{{{3}}}]] ''(added {{{4}}})''. &nbsp; <includeonly>[[Category:{{{4}}}]]</includeonly>
|case: 3=:'''Editors:''' [[User:{{{2}}}|{{{2}}}]], [[User:{{{3}}}|{{{3}}}]] and [[User:{{{4}}}|{{{4}}}]] ''(added {{{5}}})''. &nbsp; <includeonly>[[Category:{{{5}}}]]</includeonly>
|case: 3=:'''{{{edtype|Editor}}}s:''' [[User:{{{2}}}|{{{2}}}]], [[User:{{{3}}}|{{{3}}}]] and [[User:{{{4}}}|{{{4}}}]] ''(added {{{5}}})''. &nbsp; <includeonly>[[Category:{{{5}}}]]</includeonly>
|default=:'''Editor:''' [[User:{{{1}}}|{{{1}}}]] ''(added {{{2}}})''. &nbsp; <includeonly>[[Category:{{{2}}}]]</includeonly>
|default=:'''{{{edtype|Editor}}}:''' [[User:{{{1}}}|{{{1}}}]] ''(added {{{2}}})''. &nbsp; <includeonly>[[Category:{{{2}}}]]</includeonly>
}}<noinclude>
}}<noinclude>
{{prot-temp}}<br>
{{prot-temp}}<br>
Line 13: Line 13:
which produces the text
which produces the text
:'''Editor:''' [[User:editor-name|editor-name]] ''(added yyyy-mm-dd)''
:'''Editor:''' [[User:editor-name|editor-name]] ''(added yyyy-mm-dd)''


*<tt><nowiki>{{Editor|</nowiki>''2''|''editor1-name''|''editor2-name''|''yyyy-mm-dd''}}</tt>
*<tt><nowiki>{{Editor|</nowiki>''2''|''editor1-name''|''editor2-name''|''yyyy-mm-dd''}}</tt>
which produces the text
which produces the text
:'''Editors:''' [[User:editor1-name|editor1-name]] and [[User:editor2-name|editor2-name]] ''(added yyyy-mm-dd)''
:'''Editors:''' [[User:editor1-name|editor1-name]] and [[User:editor2-name|editor2-name]] ''(added yyyy-mm-dd)''


*<tt><nowiki>{{Editor|</nowiki>''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''}}</tt>
*<tt><nowiki>{{Editor|</nowiki>''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''}}</tt>
Line 24: Line 22:
:'''Editors:''' [[User:editor1-name|editor1-name]], [[User:editor2-name|editor2-name]] and [[User:editor3-name|editor3-name]] ''(added yyyy-mm-dd)''
:'''Editors:''' [[User:editor1-name|editor1-name]], [[User:editor2-name|editor2-name]] and [[User:editor3-name|editor3-name]] ''(added yyyy-mm-dd)''


To change the word '''Editor'''(s) to, say, '''Contributor'''(s), add the optional parameter <tt><nowiki>edtype=Contributor</nowiki></tt>, as in the following example:
*<tt><nowiki>{{Editor|</nowiki>''3''|''editor1-name''|''editor2-name''|''editor3-name''|''yyyy-mm-dd''|edtype=Contributor}}</tt>
which produces the text
:'''Contributors:''' [[User:editor1-name|editor1-name]], [[User:editor2-name|editor2-name]] and [[User:editor3-name|editor3-name]] ''(added yyyy-mm-dd)''
 


In all cases it also inserts the page in [[:Category:yyyy-mm-dd]].
In all cases it also inserts the page in [[:Category:yyyy-mm-dd]].
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>

Revision as of 16:08, 19 December 2008

Editor: [[User:{{{1}}}|{{{1}}}]] (added {{{2}}}).  


Documentation

Accepted syntaxes for this template:

  • {{Editor|editor-name|yyyy-mm-dd}}

which produces the text

Editor: editor-name (added yyyy-mm-dd)
  • {{Editor|2|editor1-name|editor2-name|yyyy-mm-dd}}

which produces the text

Editors: editor1-name and editor2-name (added yyyy-mm-dd)
  • {{Editor|3|editor1-name|editor2-name|editor3-name|yyyy-mm-dd}}

which produces the text

Editors: editor1-name, editor2-name and editor3-name (added yyyy-mm-dd)

To change the word Editor(s) to, say, Contributor(s), add the optional parameter edtype=Contributor, as in the following example:

  • {{Editor|3|editor1-name|editor2-name|editor3-name|yyyy-mm-dd|edtype=Contributor}}

which produces the text

Contributors: editor1-name, editor2-name and editor3-name (added yyyy-mm-dd)


In all cases it also inserts the page in Category:yyyy-mm-dd.