Template:Merge/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Harej
→‎Syntax: clarifying instructions
meta>Harej
→‎Syntax: improving the documentation
Line 13: Line 13:
Tagging a single page is simple:
Tagging a single page is simple:


:<code><nowiki>{{merge | OtherPage }}</nowiki></code>
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | OtherPage }}</nowiki></code>


To list multiple pages, separate them with a pipe:
By default, the (Discuss) link on the template links to the top of the tagged page's [[Wikipedia:Talk page|talk page]]. To specify which section, or to name a different talk page entirely, use the <code>discuss</code> parameter:


:<code><nowiki>{{merge | OtherPage1 | OtherPage2 | OtherPage3 }}</nowiki></code>
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | OtherPage | discuss=Talk:OtherPage#Merge discussion }}</nowiki></code>


The "discuss" by default links to the Talk: page of the page the template is transcluded in; to override, use a parameter named <code>discuss</code>; e.g.:
In addition, all uses of this template should be accompanied with a date and month via the <code>date</code> parameter:
:<code><nowiki>{{merge | Otherpage1 | Otherpage2 | Otherpage3 | discuss=Talk:Otherpage2#Merge-discussion-sectiontitle }}</nowiki></code>


All uses of this template should be accompanied with a date and month via the <code>date</code> parameter. For example:
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | OtherPage | discuss=Talk:OtherPage#Merge discussion | date=September 2009 }}</nowiki></code>


:<code><nowiki>{{merge | Otherpage | date=September 2009 }}</nowiki></code>
To name other pages to be merged, simply separate them with a vertical pipe:


You may combine these parameters at will.
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | OtherPage1 | OtherPage2 | OtherPage 3 | discuss=Talk:OtherPage#Merge discussion | date=September 2009 }}</nowiki></code>


These syntax rules apply to {{tl|merge}}, {{tl|mergeto}}, and {{tl|mergefrom}}.
{{#ifeq:{{BASEPAGENAME}}|Merge|To name multiple pages to merge ''into'' a single page, use the <code>target</code> parameter. For example, to merge the tagged page, as well as OtherPage1, OtherPage2, and OtherPage3 into OtherPage4, use:
 
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | OtherPage1 | OtherPage2 | OtherPage3 | target=OtherPage4 | discuss=Talk:OtherPage#Merge discussion | date=September 2009 }}</nowiki></code>|}}


{{Wikipedia:Template messages/Merging and splitting/List}}
{{Wikipedia:Template messages/Merging and splitting/List}}

Revision as of 06:38, 3 September 2009

Template:Template doc page viewed directly Template:Seealso

Which merge template should I use?

  • {{merge}} — to merge at least two together at an unspecified location
  • {{mergeto}} — to merge the contents of the tagged article into the specified article.
  • {{mergefrom}} — the opposite of {{mergeto}}; the contents of the specified article should be merged into the tagged article.

This template will add tagged articles to Category:Articles to be merged, and accepts at least one and up to 20 to be merged.

Syntax

Tagging a single page is simple:

{{Merge | OtherPage }}

By default, the (Discuss) link on the template links to the top of the tagged page's talk page. To specify which section, or to name a different talk page entirely, use the discuss parameter:

{{Merge | OtherPage | discuss=Talk:OtherPage#Merge discussion }}

In addition, all uses of this template should be accompanied with a date and month via the date parameter:

{{Merge | OtherPage | discuss=Talk:OtherPage#Merge discussion | date=September 2009 }}

To name other pages to be merged, simply separate them with a vertical pipe:

{{Merge | OtherPage1 | OtherPage2 | OtherPage 3 | discuss=Talk:OtherPage#Merge discussion | date=September 2009 }}

To name multiple pages to merge into a single page, use the target parameter. For example, to merge the tagged page, as well as OtherPage1, OtherPage2, and OtherPage3 into OtherPage4, use:

{{Merge | OtherPage1 | OtherPage2 | OtherPage3 | target=OtherPage4 | discuss=Talk:OtherPage#Merge discussion | date=September 2009 }}

{{Wikipedia:Template messages/Merging and splitting/List}}