Difference between revisions of "Template:Portal"
From PlantUse English
Rémy Doyen (Talk | contribs) |
Maëva Rouxel (Talk | contribs) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>__NOTOC__{{Frame|color = {{{color|Blue}}}|title = {{{title|"No title Entered"}}}|image1 = {{{image1|}}}|image2 = {{{image2|}}}|bgcol = {{{colback|}}}|content = {{{subtitle|"No subtitle Entered"}}}}}{{#if:{{{goal|}}}|{{Frame|bgcol = {{{colbackgoal|}}}|color = {{{color|Green}}}|content = {{{goal}}}}}|}}{{#vardefine: i | 50 }}{{#vardefine: Pair|0}}{{#vardefine: Impair|0}}{{#while:|{{#ifexpr:{{#var:i}}>0| true}}|{{#if:{{{frame{{#var:i}}|}}}|{{#vardefine:existent|{{#var:existent|0}}/{{#var:i}}}}|}}{{#vardefine:i|{{Incr|{{#var:i}}|-1}}}}}}{{#vardefine:restent|{{#var:existent}}}}{{#vardefine: Actuel|{{#titleparts:{{#var:restent}}||-1}}}}{{#while:|{{#ifexpr:{{#var:Actuel}}!=0|true}}|{{#switch:{{IsEven|{{#var: Actuel}}}}|true={{#vardefine: Pair|1}}|{{#vardefine: Impair|1}}}}{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine: Actuel|{{#titleparts:{{#var:restent}}||-1}}}}}}{{#vardefine:division|{{#expr:{{#var:Pair}} and {{#var:Impair}}}}}}{{#vardefine:restent|{{#var:existent}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}{{#ifexpr:{{#var:division}}=1|{{#while:|{{#ifexpr:{{#var:Actuel2}}!=0|true}}|{{#switch:{{IsEven|{{#var:Actuel2}}}}|true=<div | + | <includeonly>__NOTOC__{{Frame|color = {{{color|Blue}}}|title = {{{title|"No title Entered"}}}|image1 = {{{image1|}}}|image2 = {{{image2|}}}|bgcol = {{{colback|}}}|content = {{{subtitle|"No subtitle Entered"}}}}}{{#if:{{{goal|}}}|{{Frame|bgcol = {{{colbackgoal|}}}|color = {{{color|Green}}}|content = {{{goal}}}}}|}}{{#vardefine: i | 50 }}{{#vardefine: Pair|0}}{{#vardefine: Impair|0}}{{#while:|{{#ifexpr:{{#var:i}}>0| true}}|{{#if:{{{frame{{#var:i}}|}}}|{{#vardefine:existent|{{#var:existent|0}}/{{#var:i}}}}|}}{{#vardefine:i|{{Incr|{{#var:i}}|-1}}}}}}{{#vardefine:restent|{{#var:existent}}}}{{#vardefine: Actuel|{{#titleparts:{{#var:restent}}||-1}}}}{{#while:|{{#ifexpr:{{#var:Actuel}}!=0|true}}|{{#switch:{{IsEven|{{#var: Actuel}}}}|true={{#vardefine: Pair|1}}|{{#vardefine: Impair|1}}}}{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine: Actuel|{{#titleparts:{{#var:restent}}||-1}}}}}}{{#vardefine:division|{{#expr:{{#var:Pair}} and {{#var:Impair}}}}}}{{#vardefine:restent|{{#var:existent}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}{{#ifexpr:{{#var:division}}=1|{{#while:|{{#ifexpr:{{#var:Actuel2}}!=0|true}}|{{#switch:{{IsEven|{{#var:Actuel2}}}}|true=<div class="articleRight">{{Frame|color={{{color3|Darkgreen}}}|bgcol={{{colback2|}}}|content={{{frame{{#var:Actuel2}}}}}}}</div>|#default=<div class="articleLeft">{{Frame|color={{{color2|Darkgreen}}}|bgcol={{{colback1|}}}|content={{{frame{{#var:Actuel2}}}}}}}</div>}}{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}}}|{{#while:|{{#ifexpr:{{#var:Actuel2}}!=0|true}}|{{Frame|color={{{color2|Darkgreen}}}|bgcol={{{colback1|}}}|content={{{frame{{#var:Actuel2}}}}}}}{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}}}}}</includeonly><noinclude> |
==Parameters== | ==Parameters== | ||
− | + | All are optional | |
− | * title : portal | + | * title : portal title.<br> |
* subtitle : portal subtitle.<br> | * subtitle : portal subtitle.<br> | ||
* image1 : left image. <br> | * image1 : left image. <br> | ||
Line 19: | Line 19: | ||
* colback2 : right frames background color (Even) . <br> | * colback2 : right frames background color (Even) . <br> | ||
− | == | + | ==Examples== |
<nowiki>{{Portal | <nowiki>{{Portal | ||
|colback = pink | |colback = pink | ||
Line 25: | Line 25: | ||
|color2 = red | |color2 = red | ||
|color3 = yellow | |color3 = yellow | ||
− | |title = | + | |title = Portal of Biodiversity |
|subtitle = | |subtitle = | ||
|frame1 = this is | |frame1 = this is | ||
|frame3 = a frame | |frame3 = a frame | ||
|frame2 = but no one | |frame2 = but no one | ||
− | |frame4 = is | + | |frame4 = is mandatory |
}}</nowiki> gives : | }}</nowiki> gives : | ||
{{Portal | {{Portal | ||
Line 37: | Line 37: | ||
|color2 = red | |color2 = red | ||
|color3 = yellow | |color3 = yellow | ||
− | |title = | + | |title = Portal of Biodiversity |
|subtitle = | |subtitle = | ||
− | | | + | |frame1 = this is |
− | | | + | |frame3 = a frame |
− | | | + | |frame2 = but no one |
− | | | + | |frame4 = is mandatory |
}} | }} | ||
− | [[category :Template]] | + | [[category:Template]] |
</noinclude> | </noinclude> |
Latest revision as of 15:38, 10 May 2016
Parameters
All are optional
- title : portal title.
- subtitle : portal subtitle.
- image1 : left image.
- image2 : right image.
- color : color of title and goal frames.
- goal : portal goal.
- colback : background color.
- colbackgoal : goal frame background.
- frame1/2/3/4 : frame 1-2-3-4 content.
- color2 : secondary frames color (left).
- color3 : secondary frames color (right).
- colback1 : left frames background color (unEven).
- colback2 : right frames background color (Even) .
Examples
{{Portal |colback = pink |color = pink |color2 = red |color3 = yellow |title = Portal of Biodiversity |subtitle = |frame1 = this is |frame3 = a frame |frame2 = but no one |frame4 = is mandatory }} gives :
Portal of Biodiversity
this is
but no one
a frame
is mandatory