0

On my wiki I am trying to create a conditional table template. Here is the template code:

{| class="wikitable"
{{#if:{{{bazikade1|}}}{{{bazikade2|}}}|
{{!}}-
! بازیکده
{{!}} {{{bazikade1}}}
{{!}} {{{bazikade2}}}
}}{{#if:{{{bazinovin1|}}}{{{bazinovin2|}}}|
{{!}}-
! بازی نوین
{{!}} {{{bazinovin1}}}
{{!}} {{{bazinovin2}}}
}}{{#if:{{{boardboard1|}}}{{{boardboard2|}}}|
{{!}}-
! بردبرد
{{!}} {{{boardboard1}}}
{{!}} {{{boardboard2}}}
}}{{#if:{{{boardgamecenter1|}}}{{{boardgamecenter2|}}}|
{{!}}-
! بوردگیم سنتر
{{!}} {{{boardgamecenter1}}}
{{!}} {{{boardgamecenter2}}}
}}{{#if:{{{boardgameclub1|}}}{{{boardgameclub2|}}}|
{{!}}-
! بوردگیم کلاب
{{!}} {{{boardgameclub1}}}
{{!}} {{{boardgameclub2}}}
}}{{#if:{{{doozshop1|}}}{{{doozshop2|}}}|
{{!}}-
! دوزشاپ
{{!}} {{{doozshop1}}}
{{!}} {{{doozshop2}}}
}}{{#if:{{{baziplanet1|}}}{{{baziplanet2|}}}|
{{!}}-
! سیاره بازی
{{!}} {{{baziplanet1}}}
{{!}} {{{baziplanet2}}}
}}{{#if:{{{synapsi1|}}}{{{synapsi2|}}}|
{{!}}-
! سیناپسی
{{!}} {{{synapsi1}}}
{{!}} {{{synapsi2}}}
}}{{#if:{{{fekrofun1|}}}{{{fekrofun2|}}}|
{{!}}-
! فکروفان
{{!}} {{{fekrofun1}}}
{{!}} {{{fekrofun2}}}
}}{{#if:{{{goldendice1|}}}{{{goldendice2|}}}|
{{!}}-
! گلدن دایس
{{!}} {{{goldendice1}}}
{{!}} {{{goldendice2}}}
}}{{#if:{{{gamestore1|}}}{{{gamestore2|}}}|
{{!}}-
! گیم استور
{{!}} {{{gamestore1}}}
{{!}} {{{gamestore2}}}
}}{{#if:{{{vestagame1|}}}{{{vestagame2|}}}|
{{!}}-
! وستاگیم
{{!}} {{{vestagame1}}}
{{!}} {{{vestagame2}}}
}}{{#if:{{{madamak1|}}}{{{madamak2|}}}|
{{!}}-
! مادمک
{{!}} {{{madamak1}}}
{{!}} {{{madamak2}}}
}}
|}

If I use both rows it looks good. As here: enter image description here

But if I use one of them, it looks weired, as here: enter image description here

How can I fix it? Isn't it because of unicode characters I am using within the code? I tried to debug it by shortening the code but no success yet.

1 Answers1

1

Your template seems broken in a different way from your examples. The whole table will be displayed in one row because {{!}}- is not really on a new string and will not be recognised by the parser as new row command. This happens because all parser function (including {{if:}}) parametres are trimmed.

If you add <nowiki /> at the end of every line containing {{if:, you will correct this.

After doing this, in my wiki (left-to-right) the template worked as expected.

Alexander Mashin
  • 3,892
  • 1
  • 9
  • 15