User talk:Jimyoda/Template Transclusion/reply

From RimWorld Wiki
Jump to navigation Jump to search

If I understand you correctly, I've already done it. Rather than using transclusion, I've learned how to use MediaWiki's commands to work with data. Data is stored with the set command and displayed or queried with the show or ask commands, pretty much like variables in programming. When you make a table you can construct each line to display the data using the show command. That's nice, but tables still end up getting very big, repetitive, and hard to manage and edit. The elegant solution is to use a template to construct each line and display the data.

Look at Animals#Animals_List. Look at the code and you'll see no data is actually specified there. Each table line is produced using the template, Animals/Row. The data was populated within each animal's page which called Infobox main which stored the data.

Other pages, like Plants, (done by someone other than me) do a very similar thing. It's done to another level by using a 'list' command, however that page is often broken. In fact, right now it's not showing anything.

Admittedly, having pages call templates which call other templates does confuse some people trying to make certain updates, but I'm just applying MediaWiki's power and purpose, and wiki templates, and I'm willing to help anyone willing to learn it.

Let me know if you need help with anything.