Difference between revisions of "Template:Portal"
From PlantUse English
MarcBrugman (Talk | contribs) |
MarcBrugman (Talk | contribs) |
||
Line 1: | Line 1: | ||
<includeonly>__NOTOC__{{Cadre|couleur = {{{color|Blue}}}|titre = {{{title|"No title Entered"}}}|image1 = {{{image1|}}}|image2 = {{{image2|}}}|colfond = {{{colback|}}}|contenu = {{{subtitle|"No subtitle Entered"}}}}}{{#if:{{{but|}}}|{{Cadre|colfond = {{{colbackgoal|}}}|couleur = {{{color|Green}}}|contenu = {{{but}}}}}|}}{{#vardefine: i | 50 }}{{#vardefine: Pair|0}}{{#vardefine: Impair|0}}{{#while:|{{#ifexpr:{{#var:i}}>0| true}}|{{#if:{{{cadre{{#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 style="width:45%;clear:right;float:right;"><div>{{Cadre|couleur={{{color3|Darkgreen}}}|colfond={{{colback2|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div></div>|#default=<div style="width:53%;clear:left;float:left;"><div>{{Cadre|couleur={{{color2|Darkgreen}}}|colfond={{{colback1|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div></div>}}{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}}}|{{#while:|{{#ifexpr:{{#var:Actuel2}}!=0|true}}|<div>{{Cadre|couleur={{{color2|Darkgreen}}}|colfond={{{colback1|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div>{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}}}}}</includeonly><noinclude> | <includeonly>__NOTOC__{{Cadre|couleur = {{{color|Blue}}}|titre = {{{title|"No title Entered"}}}|image1 = {{{image1|}}}|image2 = {{{image2|}}}|colfond = {{{colback|}}}|contenu = {{{subtitle|"No subtitle Entered"}}}}}{{#if:{{{but|}}}|{{Cadre|colfond = {{{colbackgoal|}}}|couleur = {{{color|Green}}}|contenu = {{{but}}}}}|}}{{#vardefine: i | 50 }}{{#vardefine: Pair|0}}{{#vardefine: Impair|0}}{{#while:|{{#ifexpr:{{#var:i}}>0| true}}|{{#if:{{{cadre{{#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 style="width:45%;clear:right;float:right;"><div>{{Cadre|couleur={{{color3|Darkgreen}}}|colfond={{{colback2|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div></div>|#default=<div style="width:53%;clear:left;float:left;"><div>{{Cadre|couleur={{{color2|Darkgreen}}}|colfond={{{colback1|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div></div>}}{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}}}|{{#while:|{{#ifexpr:{{#var:Actuel2}}!=0|true}}|<div>{{Cadre|couleur={{{color2|Darkgreen}}}|colfond={{{colback1|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div>{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}}}}}</includeonly><noinclude> | ||
==Parameters== | ==Parameters== | ||
+ | all are optionnal | ||
+ | * title : portal Title.<br> | ||
+ | * subtitle : portal subtitle.<br> | ||
+ | * image1 : left image. <br> | ||
+ | * image2 : right image. <br> | ||
+ | * color : color of title and goal frames.<br> | ||
+ | * goal : portal goal. <br> | ||
+ | * colback : background color. <br> | ||
+ | * colbackgoal : goal frame background. <br> | ||
− | + | * cadre1/2/3/4 : frame 1-2-3-4 content. <br> | |
− | * | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * | + | * color2 : secondary frames color (left). <br> |
+ | * color3 : secondary frames color (right). <br> | ||
− | * | + | * colback1 : left frames background color (unEven). <br> |
− | * | + | * colback2 : right frames background color (Even) . <br> |
− | + | ==Exemples== | |
− | + | ||
− | + | ||
− | == | + | |
<nowiki>{{Portal | <nowiki>{{Portal | ||
|colback = pink | |colback = pink | ||
Line 26: | Line 25: | ||
|color2 = red | |color2 = red | ||
|color3 = yellow | |color3 = yellow | ||
− | |title = Portail | + | |title = Portail of Biodiversity |
− | |subtitle = | + | |subtitle = |
− | |cadre2 = | + | |cadre2 = this is |
− | + | |cadre6 = a frame | |
− | + | |cadre1 = but no one | |
− | + | |cadre3 = is mendatory | |
− | + | }}</nowiki> gives : | |
− | + | ||
− | + | ||
− | |cadre6 = | + | |
− | |cadre1 = | + | |
− | |cadre3 = | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | }}</nowiki> | + | |
{{Portal | {{Portal | ||
|colback = pink | |colback = pink | ||
Line 50: | Line 37: | ||
|color2 = red | |color2 = red | ||
|color3 = yellow | |color3 = yellow | ||
− | |title = Portail | + | |title = Portail of Biodiversity |
− | |subtitle = | + | |subtitle = |
− | |cadre2 = | + | |cadre2 = this is |
− | + | |cadre6 = a frame | |
− | + | |cadre1 = but no one | |
− | + | |cadre3 = is mendatory | |
− | + | ||
− | + | ||
− | + | ||
− | |cadre6 = | + | |
− | |cadre1 = | + | |
− | |cadre3 = | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
}} | }} | ||
[[category :Template]] | [[category :Template]] | ||
</noinclude> | </noinclude> |
Revision as of 10:35, 11 May 2011
Parameters
all are optionnal
- 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.
- cadre1/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) .
Exemples
{{Portal |colback = pink |color = pink |color2 = red |color3 = yellow |title = Portail of Biodiversity |subtitle = |cadre2 = this is |cadre6 = a frame |cadre1 = but no one |cadre3 = is mendatory }} gives :
Portail of Biodiversity
Maximum number of loops have been performed
Maximum number of loops have been performed