Module:Infobox/doc: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 49:
infobox
:add_row{
{tag='th', content=Infobox.param('name'), class='infobox.subheader-header', colspan='220'},
}
:add_row{
{tag='td', content=Infobox.param('image'), class='infobox-image', colspan='220'},
}
:pad(220)
:add_row{
{tag='td', content='[[Examine]]Info', class='infobox-subheader', colspan='20'},
{tag='td', content=Infobox.param('examine')},
}
:pad(20)
:add_row{
{tag='tdth', content='[[Episode]]Examine', colspan="6"},
{tag='td', content=Infobox.param('episodeexamine'), colspan="14"},
}
:add_row{
{tag='th', content='[[Episode]]', colspan="6"},
{tag='td', content=Infobox.param('examineepisode'), colspan="14"},
}
...
Line 76 ⟶ 80:
 
==Functions==
=== Special params ===
You don't need to do anything about these special parameters, but they may be used as parameters within the Template:
{| class="wikitable"
! param
! explanation
|-
| version1, version2, version3
| Button label and SMW name for each switch version of the infobox
|-
| default_version
| The default version to display when the page is loaded
|-
| version
| If there is only a single version, you can use version to set the SMW name (default SMW name is "DEFAULT")
|}
 
=== Referring to params ===
Each parameter can have a different value for each version. In addition, there are 3 different representations of each value. Therefore, a parameter must be accessed via one of the 3 helper functions:
Line 94 ⟶ 114:
| 1000
| Value formatted to be saved as an SMW property
|}
 
=== Special params ===
These parameters are handled specially by the module:
{| class="wikitable"
! param
! explanation
|-
| version1, version2, version3
| Button label and SMW name for each switch version of the infobox
|-
| default_version
| The default version to display when the page is loaded
|-
| version
| If there is only a single version, you can use version to set the SMW name (default SMW name is "DEFAULT")
|}