Template:Geomag-construction
From Geomag Wiki
Contents |
[edit] What are Templates?
A template is a convenient way for a consistent style to be applied across a whole wiki.
This page is both the template itself, the documentation for it, and an example.
In general, templates are introduced with a double open curly brace, and parameters are named after a vertical bar.
[edit] Template for creating a floating table for a Geomag model
The template described here inserts a floating table into the text of your article. For simple articles where you want the picture with caption to be on the right hand side of the page, and the text to be on the left, put the template as the very first thing in your text.
[edit] Basic usage
|
If you put the following code into an article: {{Geomag-construction|Title=Cuboctahedron
|PageTitle={{subst:PAGENAME}}
|Filename=Cuboctahedron.jpg
|Caption=The cuboctahedron using red and
yellow rods highlighting the 4
[[Wikipedia:Hexagon|hexagons]].
|Type=[[Archimedean Solids|Archimedian solid]]
|Triangles=8|Squares=6|Rods=24
|Spheres=12|Author=~~~~}}
The wiki processor translates it into the table on the right:
Use the Type parameter to specify the type of the construction. Use the Triangles parameter to specify the number of triangle panels, the Squares parameter to specify the number of square panels, the Pentagons parameter to specify the number of pentagonal panels, and the Rhombic parameter to specify the number of rhombic panels. If you omit any of these parameters they will not show up in the table. Use the Spheres parameter to specify the number of spheres you used, and the Rods parameter to specify the number of rods. An optional Author parameter allows you to put your signature in:Author=~~~~ You can always fill it in youself, e.g. Author=[[Amafirlian]] Feb 5, 2007 to get a link to your user page followed by the date. Don't touch the PageTitle parameter. It needs to be set to the actual title of the article the template is used in (which is easily accomplished using {{subst:PAGENAME}}). If the article is moved (title is renamed) then it needs to be changed. This parameter is used to track whether the template is used in a page, or is used in a derived page (e.g. using DynamicPageList) in which case the picture needs to be smaller. Unfortunately this does not work when the link parameter is used (see further on). |
|
||||||||||||||||
{{clr}}
[edit] The Link parameter
To specify the parameters of the image yourself change the Filename parameter to Link, as shown in the following example:{{Geomag-construction|PageTitle={{subst:PAGENAME}}|Title=Cuboctahedron|Link=[[Image:Cuboctahedron.jpg|150px]]
|Caption=The cuboctahedron using red and yellow rods highlighting the 4 [[Wikipedia:Hexagon|hexagons]].
|Type=[[Archimedean Solids|Archimedian solid]]
|Triangles=8|Squares=6|Rods=24|Spheres=12|Author=~~~~}}
| Cuboctahedron | |
The cuboctahedron using red and yellow rods highlighting the 4 hexagons. | |
| Type | Archimedian solid |
| Panels | 8 × 6 × |
| Rods | 24 × |
| Spheres | 12 × |
| Author | Amafirlian 11:36, 5 May 2007 (UTC) |
In this case [[Image:Cuboctahedron.jpg|150px]] is used to scale the image down to 150 pixels wide.
{{Geomag-construction|PageTitle={{subst:PAGENAME}}|Title=Dodo
|Link=[http://www.flickr.com/photos/karlhorton/462966008/ http://farm1.static.flickr.com/215/462966008_31797a1fd9_m.jpg]
|Caption=Magnetically Balanced Dodecahedron
|Type=Platonic
|Triangles=|Squares=|Pentagons=12|Rhombic=|Rods=50|Spheres=30|Author=[[User:Karl Horton|Karl Horton]] 06:43, 5 May 2007 (UTC)}}
| Dodo | |
| http://farm1.static.flickr.com/215/462966008_31797a1fd9_m.jpg Magnetically Balanced Dodecahedron | |
| Type | Platonic |
| Panels | 12 × |
| Rods | 50 × |
| Spheres | 30 × |
| Author | Karl Horton 06:43, 5 May 2007 (UTC) |