FANDOM


  • Hello, I made an External links template for the Vocaloid wiki and its song pages. I wanted to know if the 'coding' and parameters are set.

      Loading editor
    • there is some probability nobody does understand the question. is there any problems with the template?

        Loading editor
    • I just wanted someone to check if any issues arise that I can't see.

      And I wanted to increase the font.

        Loading editor
    • whole #if can be a problem: it does check any param existence, then renders all of them.

      i presume it's supposed to be like
      {#if:official|official links}
      {#if:download|download} etc
        Loading editor
    • So add #if to all parameters?

        Loading editor
    • it's up on u. i just don't know what do u need.

        Loading editor
    • I just want suggestions and better coding, if any.

        Loading editor
    • What Fngplg is saying is that your current configuration checks to see if any parameters exist. If so, it tried to display all parameters. If you want to display only ones that exist, you need to use a separate #if for each one. For example:

      "{{#if: {{{Hello|Hello}}} {{{there|}}} {{{Bunai82|}}} | {{{Hello|default 1}}} {{{there|defalut 2}}} {{{Bunai82|defalut 3}}}}}"
      

      which gives: "default 1 defalut 2 defalut 3"

      instead of:

      "{{#if: {{{Hello|Hello}}} | {{{Hello|default 1}}}}} {{#if: {{{there|}}} | {{{there|default 2}}}}} {{#if: {{{Bundai82|}}} | {{{Bundai82|default 3}}}}}"
      

      which gives: "default 1 "

        Loading editor
    • Thank you. I'm going to edit it and ask for another look if you guys are available.

        Loading editor
    • Well, that went horribly. ^_^;;

      EDIT. I think I got it? Current edit

      EDIT again. The whole template shows if only one parameter is used. See here

        Loading editor
    • Yes, that is what we were trying to tell you.

        Loading editor
    • So I mixed up the 'example' and 'instead of'.

      But you're not telling me to add "#if:" to everything.

        Loading editor
    • If the order in which I posted the markup is confusing, than I apologize. You should make yours look like the second one.

        Loading editor
    • It looks like this, but now I can't get the images to hid and only appear when the parameter is called.


      I moved it in each area in the #if but it still doesn't function correctly.

      <includeonly>
      {{#if: {{{Official|}}} |  [[File:Red Square.png|frameless|18px|link=]] '''Official links''' {{{Official|}}} }} {{Template:clr}} 
      {{#if: {{{Purchase|}}} |  [[File:Orange Square.png|frameless|18px|link=]] '''Where to purchase''' {{{Purchase|}}} }} {{Template:clr}} 
      {{#if: {{{Downloads|}}} | [[File:Yellow Square.png|frameless|18px|link=]] '''Where to Download''' {{{Downloads|}}} }} {{Template:clr}} 
      {{#if: {{{Articles|}}}  | [[File:Green Square.png|frameless|18px|link=]] '''Article sources''' {{{Articles|}}} }} {{Template:clr}} 
      {{#if: {{{Lyrics|}}}   |  [[File:Blue Square.png|frameless|18px|link=]] '''Lyrical interpretations'''{{{Lyrics|}}} }} {{Template:clr}} 
      </includeonly>
      
        Loading editor
    • It seems you have been making some changes. Are you sure it wasn't just a caching issue?

        Loading editor
    • Yes.


      New arrangement. The parameters and images now hide.

      <includeonly>
      {{#if:{{{Official|}}} | [[File:Red Square.png|frameless|18px|link=]] '''Official links''' 
      <!--  -->{{{Official|}}} }} 
      {{#if:{{{Purchase|}}} | [[File:Orange Square.png|frameless|18px|link=]] '''Where to purchase''' 
      <!--  -->{{{Purchase|}}} }} 
      {{#if:{{{Downloads|}}} | [[File:Yellow Square.png|frameless|18px|link=]] '''Where to Download''' 
      <!--  -->{{{Downloads|}}} }} 
      {{#if:{{{Articles|}}} | [[File:Green Square.png|frameless|18px|link=]] '''Article sources''' 
      <!--  -->{{{Articles|}}} }} 
      {{#if:{{{Lyrics|}}}   | [[File:Blue Square.png|frameless|18px|link=]] '''Lyrical interpretations''' 
      <!--  -->{{{Lyrics|}}} }} 
      </includeonly>
      

      Now the issue is unused parameters causing a 'spacing' / gaps. New results here.

        Loading editor
    • Try using comments to put the #if statements on different lines. For example:

      {{#if: {{{1|}}} | True | False}}<!--
      -->{{#if: {{{2|}}} | True | False}}
      
        Loading editor
    • No go. I'm giving up on it.
      Thanks for your help.

        Loading editor
    • Are you absolutely sure you have been clearing the server cache? Based on what I see, #369 should have worked. I have copied and pasted it here with the word "hello" before and after so you can see the space introduced by the empty parameters.

      hello{{#if:{{{Official|}}} | [[File:Red Square.png|frameless|18px|link=]] '''Official links''' 
      {{{Official|}}} }} <!-- 
       --> {{#if:{{{Purchase|}}} | [[File:Orange Square.png|frameless|18px|link=]] '''Where to purchase''' 
      {{{Purchase|}}} }} <!-- 
       --> {{#if:{{{Downloads|}}} | [[File:Yellow Square.png|frameless|18px|link=]] '''Where to Download''' 
      {{{Downloads|}}} }} <!-- 
       --> {{#if:{{{Articles|}}} | [[File:Green Square.png|frameless|18px|link=]] '''Article sources''' 
      {{{Articles|}}} }} <!-- 
       --> {{#if:{{{Lyrics|}}}   | [[File:Blue Square.png|frameless|18px|link=]] '''Lyrical interpretations''' 
      {{{Lyrics|}}} }}hello
      

      hello hello

        Loading editor
    • I did action purge, control cache, and cleared my internet cache.

        Loading editor
    • In that case, I have no idea why it didn't work for you. Very odd.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message