• I've been looking at options to make creating pages a bit easier and found extensions called [Variables] and [Arrays]. This would enable us to use variables on pages and templates, basically meaning you can set variables and reuse their values later in the page, like names/stamina/rounds of battles.

    You think this would be a good addition to our wiki?

      Loading editor
    • If you can figure it out, go for it.

        Loading editor
    • I've requested Wikia Staff to enable these extensions for our Wiki.

        Loading editor
    •   Loading editor
    • Here's an example on how it can be used: User:JoetjeF/Blossom of Flowers.

      The only thing that changes is that you don't have to add a name to the TitleIcon template when starting a battle section, it automatically retrieves the corresponding name set by the SubdungeonStat template. This can also be done for battles, stamina, experience etc. Saves time, mistakes and you only have to change one reference.

      It requires a minimal change to the SubdungeonStat and TitleIcon templates, but they remain 100% compatible with the current pages. I made the changes at Template:JoetjeF/SubdungeonStat and Template:JoetjeF/TitleIcon so you can have a look.

      There's currently one bug when you call the SubdungeonStat with no name, somehow it doesn't save the empty name but that will be sorted out.

      EDIT: that bug is fixed now.

        Loading editor
    • I think I see where you're going there. You can go ahead and make the changes if you want, but you might need to check to make sure it doesn't break on the stage listings, like Main Stages.

        Loading editor
    • I put the changes live and did check several pages to make sure all is working fine. It only affects pages where the TitleIcon template is called with no 'name=' parameter, so none of the current pages are affected.

      So from now on, if you're using the SubdungeonStat template (which I think is in most, if not all cases for battles), then you don't have to pass the name= parameter when using the TitleIcon template.

      I've also looked at doing something similar for SubDungeonSummary with stamina, experience and battles (see User:JoetjeF/Blossom of Flowers). That actually works well but there's one 'issue'. Now you don't have to use the sta=, battle= and exp= parameters, it simply becomes {{SubDungeonSummary}} (ie with no parameters). Unfortunately, Wikia tries to optimise template usage that don't pass parameters by reusing the previous output. As you can see in User:JoetjeF/Blossom of Flowers, the first three battle summaries display the correct values, but the fourth reuses the third output. To solve this you need to call the template with an empty parameter (ie {{SubDungeonSummary|}}) to force Wikia to rerun the template instead of using the cached output. I don't think it's a big deal as long as you're aware of it. Again, none of the existing pages are affected as it only uses the saved values if they aren't passed on to the SubDungeonSummary template. You can see that in the second battle summary.

      Hope above makes sense! If not then please let me know.

        Loading editor
    • I see what you mean. Well, it means less work, so I'm all for it. XD

        Loading editor
    • Ok, I replaced Template:SubDungeonSummary and Template:SubDungeonSummary with the update and changed the Notion of the Sangoma stage to take advantage of the new 'feature'.

      I checked some other pages and they all look fine when using the new templates.

      So to summarise (also for other admins):

      • The SubdungeonStat saves the name, sta, battle and exp variables so it can be reused in the TitleIcon and SubDungeonSummary templates. It's syntax hasn't changed so you can keep using it as you always did.
      • For the TitleIcon template, you don't have to use the name= parameter any more.
      • For the SubDungeonSummary template, you don't have to use the sta=, battle= and exp= parameters, but you do need to call it with an empty parameter (ie {{SubDungeonSummary|}}, not the horizontal bar just after SubDungeonSummary). This is a wikia limitation I've found no workaround for yet.
      • It's fully backwards compatible so no need to change any existing pages.
        Loading editor
    • It ended up making a couple of the longer list pages "exceed template includes blah blah", but I just made a copy with the old code {{SubdungeonStat/LP}}. Problem solved!

        Loading editor
    • Oh, that's interesting, how did you notice? I know that if a page exceeds some limits that a category is added to the page, but it doesn't show up in the Special:RecentChanges, does it?

      Wikia's limitations are quite, tiresome, I've to say. As soon as you try something a bit more complex you get all kind of warnings. But alas, got to live with it.

        Loading editor
    • Oh, I just went to add the new seal to Main Stages and noticed the templates were linked instead of adding their content, checked the categories and there it was. So I checked all the other stage pages and it was on Periodic Stages too.

        Loading editor
    • Ah, sorry, thought that I checked them out, not good enough it seems.

        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.