Template:Rpl: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
(→‎Name specificity: redundant with variable 2)
imported>Chris Day
No edit summary
Line 23: Line 23:
         |Rpl def3}} }}|1={{{1|}}}|2={{{2|}}} }}</includeonly><noinclude>
         |Rpl def3}} }}|1={{{1|}}}|2={{{2|}}} }}</includeonly><noinclude>


This template is used on article lists like [[CZ:Core Articles/Natural Sciences|Natural Sciences Core Articles]]. It displays a pictorial representation of the article's status, the article's title (in blue if existent, otherwise in red), and a brief description that uses the [[Template:Rpl|rpl]] template.
This template is used on article lists like [[CZ:Core Articles/Natural Sciences|Natural Sciences Core Articles]]. It displays a pictorial representation of the article's status, the article's title (in blue if existent, otherwise in red), and a brief description that uses the [[Template:Rpl|rpl]] template. Full documentation can be found at [[Template:Rpl/Doc]].
 
 
The possible depictions are [[Image:Level3.jpg|20px]], [[Image:Level2.jpg|20px]], [[Image:Level1.jpg|20px]] and [[Image:Level0.jpg|20px]], with the status of the article increasing from stubby (left) to approved (right). An external article that has been imported into citizendium with no changes is indicated by an empty status image ([[Image:Level4.jpg|20px]]).
 
 
==Example of use==
<code><nowiki>{{rpl|Biology}}</nowiki></code> produces: {{rpl|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>{{rpl|Cell (biology)}}</nowiki></code> is seen as: {{rpl|Cell (biology)}}
 
<code><nowiki>{{rpl|Cell (biology)|Cell}}</nowiki></code> is seen as: {{rpl|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>
{{rpl|Biology}}
{{rpl|Zoology||**}}
{{rpl|Cell (biology)|Cell|*::}}
{{rpl|Ecology||**}}
</pre>
|{{rpl|Biology}}
{{rpl|Zoology||**}}
{{rpl|Cell (biology)|Cell|*::}}
{{rpl|Ecology||**}}
|}
Numbering could also be used:
{| Class="wikitable"
!Code
!Example
|-
|width=250px|<pre>
{{rpl|Biology||#}}
{{rpl|Genetics||:#}}
{{rpl|Zoology||:#}}
{{rpl|Ecology||:#}}
</pre>
|{{rpl|Biology||#}}
{{rpl|Genetics||:#}}
{{rpl|Zoology||:#}}
{{rpl|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>
{{rpl|Biology||''See also: ''}}
</pre>
|{{rpl|Biology||''See also: ''}}
|-
|<pre>
{{rpl|Biology||}}
</pre>
|{{rpl|Biology||}}
|-
|
:''<code>Which means you can also do this, if you think it's preferable:</code>''
<pre>
{{r|Biology}}
**{{rpl|Zoology||}}
**{{rpl|Ecology||}}
</pre>
|
{{r|Biology}}
**{{rpl|Zoology||}}
**{{rpl|Ecology||}}
|}
 
==Redirects==
If used on an entry that is a redirect, or an article without a metadata template, the link will appear as a purple color.
 
If used on a redirect that does have a definition:
 
<code><nowiki>{{rpl|Biological}}</nowiki></code> produces: {{rpl|Biological}}
 
or:
 
<code><nowiki>{{rpl|Biological|B i o l o g i c a l}}</nowiki></code> produces: {{rpl|Biological|B i o l o g i c a l}}
 
Or for a redirect without a definition:
 
<code><nowiki>{{rpl|fMRI}}</nowiki></code> produces: {{rpl|fMRI}} .
 
 
 
==No article==
If used on an entry that does not exist but does have a definition:
 
<code><nowiki>{{rpl|Botany}}</nowiki></code> produces: {{rpl|Botany}}
 
Or:
 
<code><nowiki>{{rpl|Botany|Plant Science}}</nowiki></code> produces: {{rpl|Botany|Plant Science}}
 
If used on an entry that does not exist (e.g. [[Foobar]]), 
 
<code><nowiki>{{rpl|Foobar}}</nowiki></code> produces: {{rpl|Foobar}} .
 
Notice that there are ''three'' links in the above output:
* "Foobar" is a link to a blank article to be titled "Foobar".
* "<font color=#CA3D10>Add definition</font>" is a link to 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".
* "e" is ''another'' link to a (blank) definition subpage for "Foobar".  But this link will not disappear.  (Again, see the "Biology" line above; you can click the blue "e" on that line and from there, edit the definition of "Biology").


</noinclude>
</noinclude>

Revision as of 22:44, 20 May 2008


This template is used on article lists like Natural Sciences Core Articles. It displays a pictorial representation of the article's status, the article's title (in blue if existent, otherwise in red), and a brief description that uses the rpl template. Full documentation can be found at Template:Rpl/Doc.