Template:Portal: Difference between revisions

From Pl@ntUse
Jump to navigation Jump to search
Created page with "<includeonly>__NOTOC__ {{Cadre |couleur = {{{color|Blue}}} |titre = {{{title|"No title Entered"}}} |image1 = {{{image1|}}} |image2 = {{{image2|}}} |colfond = {{{colback|}}} |con..."
 
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>__NOTOC__  
<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>
{{Cadre
==Parameters==
|couleur = {{{color|Blue}}}
All are optional
|titre = {{{title|"No title Entered"}}}
* title : portal title.<br>
|image1 = {{{image1|}}}
* subtitle : portal subtitle.<br>
|image2 = {{{image2|}}}
* image1 : left image. <br>
|colfond = {{{colback|}}}
* image2 : right image. <br>
|contenu = {{{subtitle|"No subtitle Entered"}}}}}{{#if:{{{but|}}}|{{Cadre|colfond = {{{colfondbut|}}}|couleur = {{{couleur|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:{{EstPair|{{#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:{{EstPair|{{#var:Actuel2}}}}|true=<div style="width:45%;clear:right;float:right;"><div>{{Cadre|couleur={{{couleur3|Darkgreen}}}|colfond={{{colfond2|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div></div>|#default=<div style="width:53%;clear:left;float:left;"><div>{{Cadre|couleur={{{couleur2|Darkgreen}}}|colfond={{{colfond1|}}}|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={{{couleur2|Darkgreen}}}|colfond={{{colfond1|}}}|contenu={{{cadre{{#var:Actuel2}}}}}}}</div>{{#vardefine:restent|{{#titleparts:{{#var:restent}}|-1}}}}{{#vardefine:Actuel2|{{#titleparts:{{#var:restent}}||-1}}}}}}}}
* color : color of title and goal frames.<br>
</includeonly>
* goal : portal goal. <br>
<noinclude>
* colback : background color. <br> 
==Paramètres==
* colbackgoal : goal frame background. <br>


tous sont facultatifs.<br>
* frame1/2/3/4 : frame 1-2-3-4 content. <br>
* title : portal's Title.<br>
* subtitle : définition du sous-titre du portail.<br>
* image1 : image de gauche du cadre titre. (facultatif)<br>
* image2 : image de droitedu cadre titre. (facultatif)<br>
* couleur : couleur des cadres titre et but. (facultatif)<br>
* but : définition du but du portail. (facultatif)<br>
* colfond : couleur de fond du cadre titre. (facultatif)<br> 
* colfondbut : couleur de fond du cadre but. (facultatif)<br>  


* cadre1/2/3/4 : contenu des cadres 1-2-3-4. (facultatif)<br>
* color2 : secondary frames color (left). <br>
* color3 : secondary frames color (right). <br>


* couleur2 : couleur des cadres secondaires de droite. (facultatif)<br>
* colback1 : left frames background color (unEven). <br>
* couleur3 : couleur des cadres secondaires de gauche. (facultatif)<br>
* colback2 : right frames background color (Even) . <br>


* colfond1 : couleur de fond des cadres de gauche (impairs) (facultatif)
==Examples==
* colfond2 : couleur de fond des cadres de droite (pairs) (facultatif)
 
==Exemple==
<nowiki>{{Portal
<nowiki>{{Portal
|image =
|colback = pink
|couleur = pink
|color = pink
|couleur2 = red
|color2 = red
|couleur3 = yellow
|color3 = yellow
|titre = Portail de la Biodiversité
|title = Portal of Biodiversity
|soustitre = Ou l'on traite de la diversité biologique
|subtitle =  
|cadre2 = ceci est
|frame1 = this is
|cadre4 =  
|frame3 = a frame
{{Cadre |titre = Ouvrages de Reference Actualisés
|frame2 = but no one
    |contenu = {{ListeAlphabetique|
|frame4 = is mandatory
        |C = [[Candolle|Le livre de Candolle]]
}}</nowiki> gives :
    }}
}}
|cadre6 = un cadre
|cadre1 = mais aucun
|cadre3 =
{{Cadre |titre = Ouvrages de Reference Actualisés
    |contenu = {{ListeAlphabetique|
        |C = [[Candolle|Le livre de Candolle]]
    }}
}}
}}
}} </nowiki> donnera :
{{Portal
{{Portal
|colfond = pink
|colback = pink
|couleur = pink
|color = pink
|couleur2 = red
|color2 = red
|couleur3 = yellow
|color3 = yellow
|titre = Portail de la Biodiversité
|title = Portal of Biodiversity
|soustitre = Ou l'on traite de la diversité biologique
|subtitle =  
|cadre1 = {{Botanique}}
|frame1 = this is
|cadre2 = {{Bibliographie}}
|frame3 = a frame
|cadre4 = un cadre
|frame2 = but no one
|colfond1 = lightgreen
|frame4 = is mandatory
}}
}}
[[catégorie : Modèle]]
[[category:Template]]
</noinclude>
</noinclude>

Latest revision as of 14: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