Difference between revisions of "Template:Icon"
m (Updating for template) |
m (→Help) |
||
Line 59: | Line 59: | ||
:::To bottom Right | :::To bottom Right | ||
| | | | ||
− | {| | + | {| cellpadding="5" |
|- | |- | ||
| 1 || 2 || 3 | | 1 || 2 || 3 | ||
Line 76: | Line 76: | ||
<br> | <br> | ||
− | {| border="1" style="width: | + | {| border="1" style="width: 100%;<!--> height: 120px;<-->" |
|- | |- | ||
− | ! 2nd Parameter: Position. Mapping : | + | ! width=="33% | 2nd Parameter: Position. Mapping : |
− | ! An example of call with Calc : | + | ! width=="33% | An example of call with Calc : |
− | ! No template called here : | + | ! width=="34% | No template called here : |
|- | |- | ||
| <center> | | <center> | ||
− | {| style="width: | + | {| style="width: 100%;" |
|- | |- | ||
| Nine values from 1 to 9 | | Nine values from 1 to 9 | ||
Line 90: | Line 90: | ||
| | | | ||
− | {| | + | {| cellpadding="3" |
|- | |- | ||
| 1 | | 1 | ||
Line 111: | Line 111: | ||
The result is now a 40 pixels floating Calc icon, at the top right of the cell... The result is now a 40 pixels floating Calc icon, at the top right... | The result is now a 40 pixels floating Calc icon, at the top right of the cell... The result is now a 40 pixels floating Calc icon, at the top right... | ||
|- | |- | ||
− | ! Colspan=3 | Nine real examples ordered by position (Template calls) | + | ! bgcolor="#eefbee" Colspan=3 | Nine real examples ordered by position (Template calls) |
|- | |- | ||
|{{Icon|Impress|1|120}} | |{{Icon|Impress|1|120}} | ||
Line 126: | Line 126: | ||
|{{Icon|Calc|7|90}}90 pixels size also for this icon of Calc which should display at the bottom Left of the cell. | |{{Icon|Calc|7|90}}90 pixels size also for this icon of Calc which should display at the bottom Left of the cell. | ||
|{{Icon|Setup|8|35}}A call with "Setup" in 35 pixels, aligned center-bottom | |{{Icon|Setup|8|35}}A call with "Setup" in 35 pixels, aligned center-bottom | ||
− | |{{Icon|Wiki|9| | + | |{{Icon|Wiki|9|50}}A fantaisist call to "Wiki", mapped to "Book" in an icon of 50 pixels, who should be displayed in the last position 9, thus bottom right of this cell... |
|} | |} | ||
Revision as of 15:08, 25 May 2009
This template use the #switch function of the ParserFunctions extension.
General syntax is : <div style="{{{Position}}}">[[Image:{{{1}}}.png|{{{3}}}px]]</div>
For parameter 2 (position) only values 1 & 3 actually works. Valid expressions Left Right Unvalid expressions Center Middle Top Bottom
I see no reason for that I couldn't work. So you can :
- Help me.
- Be patient.
- Explain briefly why I could never be valid. or make me discover another existing simple syntax for this possibility.
Help
This template use three (numbered=default) parameters :
- 1. Module
- Seven values available
- Displayed below. To permit another icon it need to be registered in this template.
- 2. Position
Nine values from 1 to 9
|
|
- 3. Size in pixels
- Optional, thus in third position. Max size if ignored.
- Examples in table cells
2nd Parameter: Position. Mapping : | An example of call with Calc : | No template called here : | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{Icon|Calc|3|40}} |
The result is now a 40 pixels floating Calc icon, at the top right of the cell... The result is now a 40 pixels floating Calc icon, at the top right... | |||||||||||
Nine real examples ordered by position (Template calls) | |||||||||||||
Impress icon is called with |
The icon for Math, 60 pixels top-centered. Call |
| |||||||||||
|
|
| |||||||||||
|
|
|