FANDOM


Good work!Edit

This is a good development.

I used it some minutes ago and saw no sign of "Category:Template documentation" (so I created that myself). Is that a fault or might I have done something wrong?

Robin Patterson (Talk) 07:27, January 11, 2010 (UTC)

It's a known flaw in the preload template; it's got nothing to do with anything you did. =) I'm thinking I may have to make something akin to wikipedia:Template:Documentation subpage to handle the Category:Template documentation instead (at least, between two of us, we haven't figured out a way to get the functionality behaving correctly as-is). --Dinoguy1000 (talkcontribslogsblock log) as 67.58.229.153 08:11, January 12, 2010 (UTC)
Maybe. I know very little about preloads. I trust that you are aware that Template:Documentation is part of the Starter Pages Wikia, going into every new Wikia site and used in lots of older ones. Anything involving changing that would be bad unless it remained fully compatible and workable. I think the designers of the Wikia version did a great job simplifying it, but I have certainly noticed that there is no direct equivalent of wikipedia:Template:Documentation subpage. Maybe it's time to call User:Kirkburn back as consultant. — Robin Patterson (Talk) 09:21, January 12, 2010 (UTC)
I changed the code so that the categorization part would actually work, but… it's messy 😆
Bascially, I just replaced every instance of < and > in the tags with <includeonly><<includeonly> and <includeonly>><includeonly>. This breaks the tags (so they won't actually function as includeonly and noinclude tags) until they are preloaded, at which point it looks perfectly clean.
So this:
<noinclude><span style="display:none"></noinclude><includeonly><</includeonly>includeonly<includeonly>></includeonly><includeonly><!-- Categories for the template: -->[[</includeonly>Category:General wiki templates<includeonly>]]</includeonly><includeonly><</includeonly>/includeonly<includeonly>></includeonly><includeonly><</includeonly>noinclude<includeonly>></includeonly><includeonly><!-- Categories for this documentation: -->[[</includeonly>Category:Template documentation<includeonly>]]</includeonly><includeonly><</includeonly>/noinclude<includeonly>></includeonly><noinclude></span></noinclude>
…turns into this when editing new documentation:
<includeonly><!-- Categories for the template: -->[[Category:General wiki templates]]</includeonly><noinclude><!-- Categories for this documentation: -->[[Category:Template documentation]]</noinclude>
I also put the code into <span style="display:none"></span> because, since the tags are broken, it would otherwise appear as a line of text when viewing Template:Documentation/preload on its own (not transcluded). The span tags, of course, are noinclude, so they don't appear when editing new documentation.
I'm also working on figuring out a way to have it automatically fill in the template name so you don't have to go and replace each instance with the template name, but that's proving to be more difficult. The best I have so far is making it fill in "{{SUBST:BASEPAGENAME}}" when you edit a new doc, so it will be filled with the proper name when the page is saved, but this may be quite confusing to newer editors…

possible edit request Edit

Cheeseskates made an edit to this preload on gender wiki we might want include here. He made Category:Templates automatic. You can see more in this diff. Miiohau (talk) 08:49, November 20, 2016 (UTC)

That edit only adds the category to the preload page itself; because the category tag is enclosed in <noinclude> tags, it doesn't get included on pages that use the preload. Besides that, I'm leery of adding a category to all templates automatically; some wikis decide to use more detailed categorization (e.g. putting all infobxes in a separate category) and may not want the "default" category and their own. ディノ千?!? · ☎ Dinoguy1000 09:52, November 20, 2016 (UTC)
I understand it was just a thought. Miiohau (talk) 19:27, November 20, 2016 (UTC)
That's fine, and it wasn't a bad thought, it was perfectly reasonable. =)
You may want to ask Cheeseskates if they meant the category to only apply to the preload; I can help out if they wanted to do something else but couldn't figure out how. ディノ千?!? · ☎ Dinoguy1000 19:56, November 20, 2016 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.