Difference between revisions of "Template:Infobox:ResourceBase/doc"

From Cantr II Wiki
Jump to: navigation, search
 
(Examples of final templates in different languages)
 
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''<nowiki>{{Infobox:RecursoBase}}}</nowiki>''' is a meta-template, ie a template for creating templates. This template is intended to be a basic template for resource templates of different languages.
+
[[Template:Infobox:ResourceBase|<nowiki>{{Infobox:ResourceBase}}</nowiki>]] is a meta-template, ie a template for creating templates. This template is intended to be a basic template for resource templates of different languages.
  
 
With this template you can describe, in a single table, all the characteristics of any resource. Moreover, one can define an image with description, and an alternative title (for templates in languages other than English).
 
With this template you can describe, in a single table, all the characteristics of any resource. Moreover, one can define an image with description, and an alternative title (for templates in languages other than English).
 
+
__TOC__
 
== Usage ==
 
== Usage ==
  
 
Put the following code in the template being designed. Complete the parameters you want, delete the unused.
 
Put the following code in the template being designed. Complete the parameters you want, delete the unused.
 +
 +
'''Important note: If you want to create a resource template in your language, do not use this template, this is a ''base'' template. Instead, copy the ''final template'' of another language and translate into your language. See "Examples of final templates in different languages" section for a list of currently created templates that you can translate.'''
  
 
<pre>
 
<pre>
{{Infobox:RecursoBase
+
{{Infobox:ResourceBase
| ancho0          =  
+
| widths0  =  
| titulotabla     =  
+
| title     =  
| imagencabecera  =  
+
| image    =  
| comentarioimg  =  
+
| resize    =  
| seccion1        =  
+
| comment  =  
| ancho1          =  
+
| section1  =  
| item0seccion1   =  
+
| widths1   =  
| info0seccion1   =  
+
| item0s1   =  
| item1seccion1   =  
+
| info0s1   =  
| info1seccion1   =  
+
...
| seccion2        =
+
| item2s1   =  
| ancho2          =
+
| info2s1   =  
| item0seccion2   =  
+
| section2  =  
| info0seccion2  =  
+
| widths2   =  
| item1seccion2   =  
+
| item0s2   =  
| info1seccion2   =  
+
| info0s2   =  
| ancho3          =
+
| item1s2   =  
| tituloizq      =
+
| info1s2   =  
| tituloder      =
+
| section2b =  
| item0seccion3   =  
+
| widths2b  =  
| info0seccion3   =  
+
| item0s2b  =  
| item1seccion3   =  
+
| info0s2b  =
| info1seccion3  =  
+
...
| item2seccion3  =  
+
| item4s2b  =  
| info2seccion3  =  
+
| info4s2b  =  
| item3seccion3  =  
+
| section3  =  
| info3seccion3  =
+
| widths3   =  
| item4seccion3  =  
+
| ltitle    =  
| info4seccion3  =  
+
| rtitle    =  
| item5seccion3  =  
+
| item0s3   =  
| info5seccion3   =  
+
| info0s3   =  
| item6seccion3  =  
+
...
| info6seccion3  =  
+
| item9s3   =  
| item7seccion3   =  
+
| info9s3   =  
| info7seccion3   =  
+
}}
| item8seccion3  =
 
| info8seccion3   =  
 
| item9seccion3   =  
 
| info9seccion3  =
 
 
</pre>
 
</pre>
  
 
== Parameters ==
 
== Parameters ==
* <tt>ancho0</tt> - Width of the table (in pixels). The default is "250". I recommend not to change this parameter.
+
* <tt>widths0</tt> - Width of the table (in pixels). The default is "300". I recommend not to change this parameter.
* <tt>titulotabla</tt> - Title of the table. If not specified a title, the table is headed with the name of the article. For example, the name of this article is {{PAGENAME}}.
+
 
* <tt>imagencabecera</tt> - This parameter can be specified to add a picture that illustrates the resource.
+
* <tt>title</tt> - Title of the table. If not specified a title, the table is headed with the name of the article. For example, the name of this article is "{{PAGENAME}}".
* <tt>comentarioimg</tt> - A comment to describe the image shown. The commentary is located below the image (if you defined any).
+
 
* <tt>seccion1</tt> - Food Section title. If you define this parameter, the table shows a section with information of nutrition and healing. In addition, the section is entitled with the contents of this parameter.
+
* <tt>image</tt> - Image to be displayed. It is important to describe both the name and the file extension. '''Note that some images will make the table look extremely long. Avoid this kind of images, or use the <tt>resize</tt> parameter to resize the image, if posible.'''
* <tt>ancho1</tt> - Width of left column of the food section (in pixels). The default is "80". I recommend not to change this parameter (unless extremely necessary).
+
 
* <tt>item0seccion1</tt> - Title of the first item in the food section. If this parameter is not defined, the first item of the section is not shown.
+
* <tt>resize</tt> - This parameter can be used to resize the image. Values are expressed in pixels. Options:
* <tt>info0seccion1</tt> - Information concerning the first item in the food section. It can be used to detail the daily intake of a resource. Used in conjunction with the previous parameter.
+
** Change width: <tt>resize = 100</tt>
* <tt>item1seccion1</tt> - Edit ehis.
+
** Change width and height: <tt>resize = 100x50</tt>
* <tt>info1seccion1</tt> - Edit ehis.
+
** Original size: <tt>resize = 0</tt>
* <tt>seccion2</tt> - Edit ehis.
+
Even if width and height are specified the image will keep its original aspect ratio: either the width or the height will be equal to the specified maximum, whichever allows the other to be <= the maximum.
* <tt>ancho2</tt> - Edit ehis.
+
 
* <tt>item0seccion2</tt> - Edit ehis.
+
* <tt>comment</tt> - A comment to describe the image shown. The commentary is located below the image (if you defined any).
* <tt>info0seccion2</tt> - Edit ehis.
+
 
* <tt>item1seccion2</tt> - Edit ehis.
+
* <tt>section1</tt> - Food Section title. If you define this parameter, the table shows a section with information of nutrition and healing. In addition, the section is entitled with the contents of this parameter.
* <tt>info1seccion2</tt> - Edit ehis.
+
 
* <tt>ancho3</tt> - Edit ehis.
+
* <tt>widths1</tt> - Width of left column of the food section (in pixels). The default is "85". I recommend not to change this parameter (unless extremely necessary).
* <tt>tituloizq</tt> - Edit ehis.
+
 
* <tt>tituloder</tt> - Edit ehis.
+
* <tt>item0s1</tt> - Title of the first item in the food section. If this parameter is not defined, the first item of the section is not shown.
* <tt>itemxseccion3</tt> - Edit ehis.
+
 
* <tt>infoxseccion3</tt> - Edit ehis.
+
* <tt>info0s1</tt> - Information concerning the first item in the food section. It can be used to detail the daily intake of a resource. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>item1s1</tt> - Title of the second item in the food section. If this parameter is not defined, the second item of the section is not shown.
 +
 
 +
* <tt>info1s1</tt> - Information concerning the second item in the food section. It can be used to define the healing properties of the resource. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>section2</tt> - Raw resource section title. If you define this parameter, the table shows a section with gathering information. In addition, the section is entitled with the contents of this parameter.
 +
 
 +
* <tt>widths2</tt> - Width of left column of the gathering section (in pixels). The default is "85". I recommend not to change this parameter (unless extremely necessary).
 +
 
 +
* <tt>item0s2</tt> - Title of the fisrt item in the gathering section. If this parameter is not defined, the first item of the section is not shown.
 +
 
 +
* <tt>info0s2</tt> - Information concerning the first item in the gathering section. It can be used to detail the number of grams of this resource which is collected per day. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>item1s2</tt> - Title of the second item in the gathering section. If this parameter is not defined, the second item of the section is not shown.
 +
 
 +
* <tt>info1s2</tt> - Information concerning the second item in the gathering section. It can be used to detail the gathering skills used. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>section2b</tt> - Elaboration section title. If you define this parameter, the table shows a section with elaboration information. In addition, the section is entitled with the contents of this parameter.
 +
 
 +
* <tt>widths2b</tt> - Width of left column of the elaboration section (in pixels). The default is "85". I recommend not to change this parameter (unless extremely necessary).
 +
 
 +
* <tt>item0s2b</tt> - Title of the first item in the elaboration section. If this parameter is not defined, the first item of the section is not shown.
 +
 
 +
* <tt>info0s2b</tt> - Information concerning the first item in the elaboration section. It can be used to detail the materials involved in the elaboration of the resource. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>item1s2b</tt> - Title of the second item in the elaboration section. If this parameter is not defined, the second item of the section is not shown.  
 +
 
 +
* <tt>info1s2b</tt> - Information concerning the second item in the elaboration section.It can be used to detail the tools involved in the elaboration of the resource. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>item2s2b</tt> - Title of the third item in the elaboration section. If this parameter is not defined, the third item of the section is not shown.  
 +
 
 +
* <tt>info2s2b</tt> - Information concerning the third item in the elaboration section. It can be used to detail the machinery involved in the elaboration of the resource. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>item3s2b</tt> - Title of the fourth item in the elaboration section. If this parameter is not defined, the second item of the section is not shown.  
 +
 
 +
* <tt>info3s2b</tt> - Information concerning the fourth item in the elaboration section. It can be used to detail the elaboration skills used. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>item4s2b</tt> - Title of the fifth item in the elaboration section. If this parameter is not defined, the fifth item of the section is not shown.
 +
 
 +
* <tt>info4s2b</tt> - Information concerning the fifth item in the elaboration section. It can be used to detail the number of grams of this resource which are elaborated per day. Used in conjunction with the previous parameter.
 +
 
 +
* <tt>section3</tt> - Gathering rates section title. If you define this parameter, the table shows a section with gathering information. In addition, the section is entitled with the contents of this parameter.
 +
 
 +
* <tt>widths3</tt> - Width of left column of the gathering rates section (in pixels). The default is "260". I recommend not to change this parameter (unless extremely necessary).
 +
 
 +
* <tt>ltitle</tt> - Title of the left column. This parameter is required.
 +
 
 +
* <tt>rtitle</tt> - Title of the right column. This parameter is required.
 +
 
 +
* <tt>itemxs3</tt> - Item number x in the left column. Replacing "x" by a number from 0 to 9. Use together with the following parameter.  
 +
 
 +
* <tt>infoxs3</tt> - Information number x in the right column. Replacing "x" by a number from 0 to 9. Shown only if defined <tt>itemxs3</tt>.
 +
 
 +
== Examples of final templates in different languages ==
 +
You can add the different versions (translations) of the final template here:
 +
* [[Template:Infobox:Recurso]] - Spanish version (versión española)
 +
* [[Template:Infobox:Resource]] - English version
 +
* [[Template:Infobox:Rohstoffe]] - German version
 +
* [[Template:Infobox:Ressources]] - French version
 +
* Add version here
  
== Examples ==
+
<noinclude>[[Category:Documentation|{{PAGENAME}}]]</noinclude>
[[Template:Recurso|Here]] is an example of this template being used for the Spanish version of a template for resources.
 

Latest revision as of 07:47, 30 December 2017

{{Infobox:ResourceBase}} is a meta-template, ie a template for creating templates. This template is intended to be a basic template for resource templates of different languages.

With this template you can describe, in a single table, all the characteristics of any resource. Moreover, one can define an image with description, and an alternative title (for templates in languages other than English).

Usage

Put the following code in the template being designed. Complete the parameters you want, delete the unused.

Important note: If you want to create a resource template in your language, do not use this template, this is a base template. Instead, copy the final template of another language and translate into your language. See "Examples of final templates in different languages" section for a list of currently created templates that you can translate.

{{Infobox:ResourceBase
| widths0   = 
| title     = 
| image     = 
| resize    = 
| comment   = 
| section1  = 
| widths1   = 
| item0s1   = 
| info0s1   = 
...
| item2s1   = 
| info2s1   = 
| section2  = 
| widths2   = 
| item0s2   = 
| info0s2   = 
| item1s2   = 
| info1s2   = 
| section2b = 
| widths2b  = 
| item0s2b  = 
| info0s2b  =
...
| item4s2b  = 
| info4s2b  = 
| section3  = 
| widths3   = 
| ltitle    = 
| rtitle    = 
| item0s3   = 
| info0s3   = 
...
| item9s3   = 
| info9s3   = 
}}

Parameters

  • widths0 - Width of the table (in pixels). The default is "300". I recommend not to change this parameter.
  • title - Title of the table. If not specified a title, the table is headed with the name of the article. For example, the name of this article is "Infobox:ResourceBase/doc".
  • image - Image to be displayed. It is important to describe both the name and the file extension. Note that some images will make the table look extremely long. Avoid this kind of images, or use the resize parameter to resize the image, if posible.
  • resize - This parameter can be used to resize the image. Values are expressed in pixels. Options:
    • Change width: resize = 100
    • Change width and height: resize = 100x50
    • Original size: resize = 0

Even if width and height are specified the image will keep its original aspect ratio: either the width or the height will be equal to the specified maximum, whichever allows the other to be <= the maximum.

  • comment - A comment to describe the image shown. The commentary is located below the image (if you defined any).
  • section1 - Food Section title. If you define this parameter, the table shows a section with information of nutrition and healing. In addition, the section is entitled with the contents of this parameter.
  • widths1 - Width of left column of the food section (in pixels). The default is "85". I recommend not to change this parameter (unless extremely necessary).
  • item0s1 - Title of the first item in the food section. If this parameter is not defined, the first item of the section is not shown.
  • info0s1 - Information concerning the first item in the food section. It can be used to detail the daily intake of a resource. Used in conjunction with the previous parameter.
  • item1s1 - Title of the second item in the food section. If this parameter is not defined, the second item of the section is not shown.
  • info1s1 - Information concerning the second item in the food section. It can be used to define the healing properties of the resource. Used in conjunction with the previous parameter.
  • section2 - Raw resource section title. If you define this parameter, the table shows a section with gathering information. In addition, the section is entitled with the contents of this parameter.
  • widths2 - Width of left column of the gathering section (in pixels). The default is "85". I recommend not to change this parameter (unless extremely necessary).
  • item0s2 - Title of the fisrt item in the gathering section. If this parameter is not defined, the first item of the section is not shown.
  • info0s2 - Information concerning the first item in the gathering section. It can be used to detail the number of grams of this resource which is collected per day. Used in conjunction with the previous parameter.
  • item1s2 - Title of the second item in the gathering section. If this parameter is not defined, the second item of the section is not shown.
  • info1s2 - Information concerning the second item in the gathering section. It can be used to detail the gathering skills used. Used in conjunction with the previous parameter.
  • section2b - Elaboration section title. If you define this parameter, the table shows a section with elaboration information. In addition, the section is entitled with the contents of this parameter.
  • widths2b - Width of left column of the elaboration section (in pixels). The default is "85". I recommend not to change this parameter (unless extremely necessary).
  • item0s2b - Title of the first item in the elaboration section. If this parameter is not defined, the first item of the section is not shown.
  • info0s2b - Information concerning the first item in the elaboration section. It can be used to detail the materials involved in the elaboration of the resource. Used in conjunction with the previous parameter.
  • item1s2b - Title of the second item in the elaboration section. If this parameter is not defined, the second item of the section is not shown.
  • info1s2b - Information concerning the second item in the elaboration section.It can be used to detail the tools involved in the elaboration of the resource. Used in conjunction with the previous parameter.
  • item2s2b - Title of the third item in the elaboration section. If this parameter is not defined, the third item of the section is not shown.
  • info2s2b - Information concerning the third item in the elaboration section. It can be used to detail the machinery involved in the elaboration of the resource. Used in conjunction with the previous parameter.
  • item3s2b - Title of the fourth item in the elaboration section. If this parameter is not defined, the second item of the section is not shown.
  • info3s2b - Information concerning the fourth item in the elaboration section. It can be used to detail the elaboration skills used. Used in conjunction with the previous parameter.
  • item4s2b - Title of the fifth item in the elaboration section. If this parameter is not defined, the fifth item of the section is not shown.
  • info4s2b - Information concerning the fifth item in the elaboration section. It can be used to detail the number of grams of this resource which are elaborated per day. Used in conjunction with the previous parameter.
  • section3 - Gathering rates section title. If you define this parameter, the table shows a section with gathering information. In addition, the section is entitled with the contents of this parameter.
  • widths3 - Width of left column of the gathering rates section (in pixels). The default is "260". I recommend not to change this parameter (unless extremely necessary).
  • ltitle - Title of the left column. This parameter is required.
  • rtitle - Title of the right column. This parameter is required.
  • itemxs3 - Item number x in the left column. Replacing "x" by a number from 0 to 9. Use together with the following parameter.
  • infoxs3 - Information number x in the right column. Replacing "x" by a number from 0 to 9. Shown only if defined itemxs3.

Examples of final templates in different languages

You can add the different versions (translations) of the final template here: