FANDOM


  • On the wiki I admin, we have a custom table template we use to structure most of our pages: here

    This template was made long before I was ever active on this wiki, and I hardly know anything about coding to resolve this problem, but when someone on our wiki edits pages containing this template using the Visual Editor, the source code changes, with the parameters switching around. (A recent example can be found here.) Is there any way to fix this?

    I've been told before that changing everyone's editor preference on our wiki is against the rules, but it is annoying having to re-edit pages to fix this problem, especially when it makes things somewhat difficult whenever someone new tries to edit, but then see their edit being undone/reversed, then modified, and potentially being saddened or become defensive and either don't edit anymore or argue with our members and staff.

      Loading editor
    • Why is the order of parameters important? Unfortunately, there is not way to fix this. The VisualEditor (as well as the rich-text editor) both place parameters in the order they appear in the template. To change this behavior would require either reworking the code for the editors or using JS to come up with some site-specific patch. I am not convinced the latter is even possible. If it is, it would probably be considered a violation of the customization policy.

        Loading editor
    • The order is important as we have to edit these pages multiple times, so having them in a certain order makes them easier to update, especially since we mass-update multiple times a month.

      All the main editors use the Source Editor, and we organize the parameters exactly how it appears in the template's coding. Nowhere can I find why the "clan" parameter is appears at the top when using Visual Editor.

        Loading editor
    • Arboros Renegade, Vere#3
      we organize the parameters exactly how it appears in the template's coding

      no, you didn't. the 1st parameter is the "style" one (empty, so not included by the editor); 2nd one is the "clan" one. look at the template source code. if you want to rearrange the order, you can add all parameters at the top of the template:
      {{#if:{{{param1}}}}}{{#if:{{{param2}}}}}
      etc
      this should help.
        Loading editor
    • Ohhhhh I get what you're talking about. I didn't think that part counted. I'll try it out, thanks.

        Loading editor
    • If it were a portable infobox, perhaps it wouldn't (I don't know for sure). It all depends on how the editor detects parameters. In your case, you are not using a portable infobox but a classic template. The only difference between a regular page and a classic template is that a template uses parameters. There is no special parameter section like there is for portable infoboxes. As such, the only way the editor could possibly detect parameters is to just scan through the template source, in order, through everything. It has zero knowledge about which uses of the parameters are displayed and which are not.

        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
Community content is available under CC-BY-SA unless otherwise noted.