Board Thread:Support Requests - Getting Technical/@comment-24424249-20150723235653/@comment-15636815-20151020063518

Well, if we've lost you, then a mere thanks for our input is insufficient. Let me try to break it down to simpler terms. This post is slightly long, but I promise it will be worth your time to read the whole thing.

You want to have and use a template that creates trigger warnings. For our discussion here, we'll call it, suitably enough,.

Now let us assume that you already have another template on your site,, that produces spoiler warnings inside of attractively formatted boxes. You decide that you want to use the same type of attractively formatted box to display the trigger warnings. While you're thinking about this, you realise that you actually have about four, ten, or seventy-five different warnings or notices for which you want to create templates, and you want them all to be in the same type of box. You can accomplish this in one of two ways.

The first way is to copy the same code over and over, from one template to another. While this works fine, it isn't very efficient. You have dozens of copies of the same instructions all over your site. These require extra storage space and processing time.

The second way is to create another template that does nothing other than build the attractively formatted boxes you like. It doesn't add any text to them; it only builds the boxes. We'll call this.

Now, instead of having duplicated code everywhere, you can have this:

...lots of cool code that makes the shiny boxes...

...text of spoiler warning...

...text of trigger warning...

Now your wiki is more efficient because you've replaced all 75 copies of the duplicated code with one copy, which you can call any time you need it. With me so far?

NOW, imagine that you didn't create all the stuff I just described. Instead, while you were browsing through various wikias, you just happened to find The World's Most Perfect Trigger Warning Template, or TWMPTWT, for short. It's not on your wiki. It's not even on a wiki you ever heard of before. but that doesn't stop you. You find the template you want, view the source code, and copy the code. Then you create  on your wiki, paste in the content of TWMPTWT, and save it. All is right with the world.

That is, until the first time you attempt to use  on one of your pages. When you copied and pasted the other wiki's code, you didn't realise that the template doesn't build the box itself. Instead, it calls another template like. builds the box, then TWMPTWT adds the text. Because you didn't know this, you didn't copy. You don't even know what  is. All you know is your new  isn't showing the same awesome warning boxes you saw TWMPTWT display on the other wiki.



This is one of the problems that the  page was designed to fix. If, instead of using the awkward and inefficient copy-and-paste method described above, you exported TWMPTWT from the other wiki, Export would notice that TWMPTWT calls  and export BOTH templates for you, together. Then you can import both templates into your wiki, together, and live happily ever after.