Template:Icon

From Apache OpenOffice Wiki
Jump to: navigation, search
{{{3}}}px


This template use the #switch function of the ParserFunctions extension.

General syntax is :
[[Image:{{{1}}}.png|{{{3}}}px]]

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
2. Position 
Mapping
Nine values from 1 to 9
From Top Left
To bottom Right
1 2 3
4 5 6
7 8 9
3. Size in pixels 
Optional, thus in third position. Max size if ignored.


Examples in table cells


2nd Parameter: Position. Mapping: The call should be : No template called here :
Nine values from 1 to 9
From Top Left
To bottom Right
1 2 3
4 5 6
7 8 9
Code :
{{Icon|Calc|3|40}}
Calc.png

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...

Real examples (Template calls)
Impress.png


Impress icon is called with {{Icon|Impress|1|120}} and this example need a lot of text to fill the cell, because of the icon size. Impress icon is called with {{Icon|Impress|1|120}} and this example need a lot of text to fill the cell, because of the icon size.

Math.png


The icon for Math, 60 pixels top-centered. Call {{Icon|Math|2|60}. The icon for Math, 60 pixels top-centered. Call {{Icon|Math|2|60}}.

Base.png


{{Icon|Base|3|80}} Give a floating icon for Base, 80 pixel sized, top right aligned. {{Icon|Base|3|80}} Give a floating icon for Base, 80 pixel sized, top right aligned. {{Icon|Base|3|80}} Give a floating icon for Base, 80 pixel sized, top right aligned.

Edit.png


Edit

Draw.png


Draw

Writer.png


Writer

Personal tools