Template:RD/doc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
(New page: This template is used on CZ:Related Articles pages. ==Examples of use== <code><nowiki>{{RD|Biology}}</nowiki></code> produces: {{RD|Biology}} Two different links (r and e) are presen...)
 
imported>Chris Day
No edit summary
Line 1: Line 1:
This template is used on [[CZ:Related Articles]] pages.
This template is used for tracking the disambiguation status of terms that could have multiple meanings. See ..........


==Examples of use==
==Code==
<code><nowiki>{{RD|Biology}}</nowiki></code> produces: {{RD|Biology}}
 
Two different links (r and e) are present between the brackets.
:[r] links to the Related Articles subpage for the "basename".  If no such page exists yet, the link will be red.
:[e] links to the definition subpage for the "basename".  You can click the "e" to edit the definition of "Biology".
===Adjusting name (variable 2)===
The name does not have to be identical to the articles name. This might be useful when the context of the word is not in doubt. For example, on the [[Biology/Related Articles]] page it would be better to use the word [[Cell]] rather than [[Cell (biology)]].
 
<code><nowiki>{{RD|Cell (biology)}}</nowiki></code> is seen as: {{RD|Cell (biology)}}
 
<code><nowiki>{{RD|Cell (biology)|Cell}}</nowiki></code> is seen as: {{RD|Cell (biology)|Cell}}
 
===Formatting (variable3)===
The default formatting is a single non-numbered list element, but this can be overridden using a third variable, which contains a different style. Note that you don't have to give a second argument, to be able to specify the third - just set the second argument to blank, by typing "||", and the name shown will be the same as the link. Some examples include:
{| Class="wikitable"
!Code
!Example
|-
|width=250px|<pre>
{{RD|Biology}}
{{RD|Zoology||**}}
{{RD|Animal||*::}}
{{RD|Ecology||**}}
</pre>
|{{RD|Biology}}
{{RD|Zoology||**}}
{{RD|Animal||*::}}
{{RD|Ecology||**}}
|}
Numbering could also be used:
{| Class="wikitable"
!Code
!Example
|-
|width=250px|<pre>
{{RD|Biology||#}}
{{RD|Genetics||:#}}
{{RD|Zoology||:#}}
{{RD|Ecology||:#}}
</pre>
|{{RD|Biology||#}}
{{RD|Genetics||:#}}
{{RD|Zoology||:#}}
{{RD|Ecology||:#}}
|}
 
In fact, any text you wish can be prepended to the line, using the third argument - or even nothing at all, if that's what you need:
 
{| Class="wikitable"
!Code
!Example
|-
|width=250px|<pre>
{{RD|Biology||''See also: ''}}
</pre>
|{{RD|Biology||''See also: ''}}
|-
|<pre>
{{RD|Biology||}}
</pre>
|{{RD|Biology||}}
|-
|
:''<code>Which means you can also do this, if you think it's preferable:</code>''
<pre>
<pre>
{{RD|Biology}}
<includeonly>{{{3|* }}}{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
**{{RD|Zoology||}}
          |r style2
**{{RD|Ecology||}}
          |rpl style4}}|1={{{1|}}}}} : {{Rpl def2|1={{{1|}}}}}
</pre>
|
{{RD|Biology}}
**{{RD|Zoology||}}
**{{RD|Ecology||}}
|}
<!-- We'll stop now, we promise! :-) -->
 
==Other features==
This template uses color and pictogram indicators to convey other information about the basename that might be useful for an author wishing to know the state of the potential article or cluster. These are described in the following sections.
===Ready for Approval===
If an article is being recommended for approval this will be noted in the R template by the addition of a green approval logo at the start of the article name. For example, <nowiki>{{RD|James Clerk Maxwell}}</nowiki> would look similar to the following if it was up for approval:
 
* [[Image:Approval button.png|13px]] [[James Clerk Maxwell]] [r]: (1831 – 1879) Scottish physicist best known for his formulation of electromagnetic theory and the statistical theory of gases. [e]
 
===No article or definition===
If used on an entry that does not exist or have a definition (e.g. [[Foobar]]), 
 
<code><nowiki>{{RD|Foobar}}</nowiki></code> produces: {{RD|Foobar}} .
 
Notice that there are ''three'' links in the above output:
* "Foobar" is a link to a blank article to be titled "Foobar".
* The r link will preload a page formated to start a Related Articles subpage. To learn what to write there, please see [[CZ:Related Articles]].
*  ''<font color=#666666>Add brief definition or description</font>'' is a link to start a Definition subpage for "Foobar".  You would click on that link and write a definition, and save it, and then it would appear here.  To learn what to write there, please see [[CZ:Definitions]].  Once you have written a definition, this link will disappear and the definition will appear in its place, as you can see above with the definition of "Biology".
 
===No article but has a definition===
If used on an entry that does not exist but does have a definition:
 
<code><nowiki>{{RD|Dundee}}</nowiki></code> produces: {{RD|Dundee}}
 
The red link gives the following preload text to allow the creation of a lemma article (see next section). 
<pre>
{{subpages}}
<!-- Text is transcluded from the BASEPAGENAME/Definition subpage-->
</pre>
</pre>
With a "definition only" the article link will be red, but by creating a lemma article (article with the preloaded text above) the link does exist and hence no red link. The article actually uses the same text as the definition (the lemma article transcludes text from the definition subpage), consequently, the article does not have to be developed beyond a glossary entry.
===Only an article page and a definition exist===
This is known as a lemma article, basically nothing more than a definition is expected to be written.
<code><nowiki>{{RD|Foo lemma}}</nowiki></code> produces: {{RD|Foo lemma}}
The ''black text link'' to the lemma article will remain as an indication to authors that a new article on that topic can/could/should be written if appropriate.
===Redirects===
If the R template is used on an entry that is a redirect, or a lemma article without a metadata template, the link will appear as black text.
If used on a redirect that does have a definition:
:In this case:-
::1) the supernova article is a redirect as follows ''<nowiki>#Redirect [[Nova (astronomy)#Supernova]]</nowiki>'':
::2) and a definition does exist at [[Supernova/Definition]].
<code><nowiki>{{RD|Supernova}}</nowiki></code> produces: {{RD|Supernova}}
Or for a redirect without a definition:
<code><nowiki>{{RD|fMRI}}</nowiki></code> produces: {{RD|fMRI}} .
For such an example the normal blue link can be made to appear by using the second variable.
<nowiki>{{RD|Functional magnetic resonance imaging|fMRI}}</nowiki> will give: {{RD|Functional magnetic resonance imaging|fMRI}}
Or a different definition can be written if the terms are distinct enough, such as supernova above. In the latter case, the ''black text link'' style will remain as an indication to authors that a new article on that topic can/could/should be written.
===On own Related Articles subpage===
When this template is used for an article name and is placed on that article, or one of its subpages, it will not show hyperlinks or a definition but just show the term in plain text.
===Ambiguous terms===
If it is used on a term which is ambiguous (formally, there is a "{Basename} (disambiguation)" page), it instructs that one should not use that term, but pick one of the specific meanings to link to. For example:
<nowiki>{{RD|Cell}}</nowiki> gives {{RD|Cell}}
Thus, one would edit to a more precise link:
<nowiki>{{RD|Cell (biology)|Cell}}</nowiki> gives {{RD|Cell (biology)|Cell}}


==Code==
===Control color of basename link, pipelink and ToApprove logo===
===Control color of basename link, pipelink and ToApprove logo===
<pre>
<pre>
{{ {{#ifeq:{{{2|}}}|D
<includeonly>{{{2|* }}}{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
|{{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
           |r style2
           |r style2
           |rpl style4}}
           |rpl style4}}|1={{{1|}}}}}
|{{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |{{#if: {{{2|}}}
                |r style1
                |r style2 }}
          |rpl style3}} }}|1={{{1|}}}|2={{{2|}}} }}
</pre>
 
====[[Template:R style1|R style1]]====
<pre>
{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |{{#if:{{Template:{{{1|}}}/Metadata|info=ToA editor}}
                  |Approval button
                  |x0 }}
          | x0}} }}[[{{{1|}}}|{{{2|}}}]]
</pre>
</pre>


Line 178: Line 22:
                   |x0 }}
                   |x0 }}
           | x0}} }}[[{{{1|}}}]]
           | x0}} }}[[{{{1|}}}]]
</pre>
====[[Template:Rpl style3|Rpl style3]]====
<pre>
{{#ifexist:{{{1|}}}
                |{{#if: {{{2}}}
                      |[[{{{1|}}}{{!}}<font color=#111111>{{{2|}}}</font>]]
                      |[[{{{1|}}}{{!}}<font color=#111111>{{{1|}}}</font>]]}}
                |{{#ifexist:{{{1|}}}/Definition
                      |{{#if: {{{2}}}
                            |[http://en.citizendium.org/wiki?action=edit&
preload=Template%3APreload_Article&title={{urlencode:{{{1}}}}} <font color=#8B0541>{{{2}}}</font>]
                            |[http://en.citizendium.org/wiki?action=edit&
preload=Template%3APreload_Article&title={{urlencode:{{{1}}}}} <font color=#8B0541>{{{1}}}</font>] }}
                      |{{#if: {{{2}}}
                            |[[{{{1|}}}{{!}}{{{2|}}}]]
                            |[[{{{1|}}}]]}} }} }}
</pre>
</pre>


Line 208: Line 34:
<pre>
<pre>
[[Image:Approval button.png|14px]]&nbsp;
[[Image:Approval button.png|14px]]&nbsp;
</pre>
===To add the [r] link to the Related Articles subpage===
<pre>
<span class="plainlinks" style="font-size:0.8em;">{{#ifexist:{{{1}}}/Related Articles|[<nowiki>
</nowiki>[[{{{1}}}/Related Articles|r]]<nowiki></nowiki>]|[<nowiki>
</nowiki>[http://en.citizendium.org/wiki?action=edit&preload=
Template%3ARelated_Articles_start&title={{urlencode:{{{1}}}}}/Related_Articles
<font color=#8B0541>r</font>]<nowiki></nowiki>]}}</span>}}
</pre>
</pre>


===To add definition.===
===To add definition.===
<pre>
<pre>
{{ {{#ifeq:{{{2|}}}|D
{{Rpl def2|1={{{1|}}}}}
      |Rpl def2
      |{{#ifexist: {{{1|}}} (disambiguation)
          |dabdef
          |{{#ifexist: {{{1|}}}/Definition
              |Rpl def1
              |Rpl def3}} }} }}|1={{{1|}}}|2={{{2|}}} }}
</pre>
====[[Template:Rpl def1|Rpl def1]]====
<pre>
{{:{{{1}}}/Definition}} <span class="plainlinks" style="font-size:0.8em;">[<nowiki></nowiki>
[http://en.citizendium.org/wiki?title={{urlencode:{{{1}}}}}/Definition&action=edit e]<nowiki></nowiki>]</span>}}
</pre>
</pre>


Line 253: Line 59:
disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font color=#666666>Please add a disambiguation  
disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font color=#666666>Please add a disambiguation  
page.</font>''] }} }}
page.</font>''] }} }}
</pre>
====[[Template:Rpl def3|Rpl def3]]====
<pre>
[http://en.citizendium.org/wiki?action=edit&preload=Template%3ADef_preload&title=
{{urlencode:{{{1}}}}}/Definition ''<font color=#666666>Add brief definition or description</font>'']
</pre>
====[[Template:dabdef|dabdef]]====
<pre>
{{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
      |{{ {{#ifexist: {{{1|}}}/Definition
            |Rpl def1
            |Rpl def3}}|1={{{1|}}}|2={{{2|}}} }}
|''<font color=#666666>Please do not use this term in your topic list, because there is no single article
for it. Please substitute a more precise </font>{{#ifexist:{{{1|{{BASEPAGENAME}}}}} (disambiguation)
|<font color=#666666>term. See</font> [[{{{1|{{BASEPAGENAME}}}}} (disambiguation)]]
<font color=#666666>for a list of available, more precise, topics. Please add a new usage if needed.</font>''
|<font color=#666666>term from the disambiguation page. </font>
::Note: currently there is no disambiguation page for '''{{{1|{{BASEPAGENAME}}}}}''',
[http://en.citizendium.org/wiki?action=edit&preload=Template%3APreload-disambig&title=
{{urlencode:{{{1|{{BASEPAGENAME}}}}}}}_(disambiguation) please create one.]''}} }}
</pre>
</pre>

Revision as of 12:09, 25 February 2009

This template is used for tracking the disambiguation status of terms that could have multiple meanings. See ..........

Code

<includeonly>{{{3|* }}}{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |r style2
          |rpl style4}}|1={{{1|}}}}} : {{Rpl def2|1={{{1|}}}}}

<includeonly>{{{2|* }}}{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |r style2
          |rpl style4}}|1={{{1|}}}}}

R style2

{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |{{#if:{{Template:{{{1|}}}/Metadata|info=ToA editor}}
                  |Approval button
                  |x0 }}
          | x0}} }}[[{{{1|}}}]]

Rpl style4

{{#ifexist:{{{1|}}}
                 |[[{{{1|}}}{{!}}'''''{{{1|}}}''''']]
                 |[[{{{1|}}}]] }}

Approval button

[[Image:Approval button.png|14px]] 

To add definition.

{{Rpl def2|1={{{1|}}}}}

Rpl def2

{{#ifexist: {{{1|}}}/Definition
             |{{#ifexist: {{{1|}}} (disambiguation)
                      |''[http://en.citizendium.org/wiki?title={{urlencode:{{{1|}}}}}/
Definition&action=edit&section=new&preload=Template:Preload-disambig-speedydelete <font 
color="darkred">Definition</font>]'' and disambiguation exist at [[{{{1|}}}/Definition]] and [[{{{1|}}} 
(disambiguation)]]
::''Current definition is:'' {{def|{{{1}}}}}
                      |Definition exists at [[{{{1|}}}/Definition]]; [http://en.citizendium.org/wiki?
action=edit&preload=Template%3APreload-disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font 
color=#666666>please add a disambiguation page</font>''].
::''Current definition is:'' {{def|{{{1}}}}} }}
             |{{#ifexist: {{{1|}}} (disambiguation)
                      |[[Image:Level0.jpg|15px]] Disambiguation exists at [[{{{1|}}} (disambiguation)]]
                      |[http://en.citizendium.org/wiki?action=edit&preload=Template%3APreload-
disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font color=#666666>Please add a disambiguation 
page.</font>''] }} }}