Hi Perharps someone gives a minut to get rid of that :
.. my Loop Template fails in testing/creating/keeping TWO params {{Loop2}}, even without any param, must dysplay <p1> - <p2> NB : {{Loop2}} is called by other Template and must "give" both.
<!----------- Code de {{Loop2}} -----------> Début de Loop2<br /> {{#if:{{{1|}}}|<!-- "Then.1" Réussite du test de <1> on passe au <2> --> {{#if:{{{2|}}}|<!-- "Then.2" Réussite du test de <2> -->
On obtient {{{1}}} - {{{2}}} <!-- NB : On veut obtenir p1 - p2 -->
|<!-- Echec du test de <2> "Else.2" on crée <p2>et on réinjecte --> correction de <2> <br />{{Loop2|{{{1}}}|p2}} }} |<!-- Echec du test de <1> "Else.1" on crée <p1> et on réinjecte--> correction de <1> <br />{{Loop2|p1|{{{2}}}}} }}
<!------------ On obtient ----------------> Début de Loop2 correction de <1> Début de Loop2 On obtient p1 - {{{2}}}
Can see that gives well the first <1> but the second stays {{{2}} = I understand that {{{2}}} becomes the only unanammed param in the second pass (when {{{1}}} : <p1>) but I don't know how to solve that comportement and get the both parameters
... where have I to search : {{subst:}}? <noinclude>? #http://meta.wikimedia.org/wiki/Help:Advanced_templates #http://meta.wikimedia.org/wiki/Help:Substitution#Parameter_default_considera... #http://meta.wikimedia.org/wiki/Help:Template#Repetition_within_a_page #http://meta.wikimedia.org/wiki/Help:Template
On 10/04/2008, Dr JFBurté burtejf@orange.fr wrote:
Hi Perharps someone gives a minut to get rid of that :
.. my Loop Template fails in testing/creating/keeping TWO params {{Loop2}}, even without any param, must dysplay <p1> - <p2> NB : {{Loop2}} is called by other Template and must "give" both.
<!----------- Code de {{Loop2}} ----------->
Début de Loop2<br /> {{#if:{{{1|}}}|<!-- "Then.1" Réussite du test de <1> on passe au <2> --> {{#if:{{{2|}}}|<!-- "Then.2" Réussite du test de <2> -->
On obtient {{{1}}} - {{{2}}} <!-- NB : On veut obtenir p1 - p2 -->
|<!-- Echec du test de <2> "Else.2" on crée <p2>et on réinjecte --> correction de <2> <br />{{Loop2|{{{1}}}|p2}} }} |<!-- Echec du test de <1> "Else.1" on crée <p1> et on réinjecte--> correction de <1> <br />{{Loop2|p1|{{{2}}}}} }}
You need to change the {{{1}}} and {{{2}}} to {{{1|}}} and {{{2|}}} - if they're blank, you get a literal {{{2}}}, exactly what's displayed in your test, so you need to make them default to the empty string.
mediawiki-l@lists.wikimedia.org