User talk:Johan G/Template:Informative template with preloaded text

From FlightGear wiki
Jump to navigation Jump to search

Purpose of this draft

Ideally I would like to replace all {{informative template}} with a template named {{template documentation}}, which is a much, much less ambiguous name. I would also like to put all template documentation on /doc subpages.

I should mention that one of the points in having it on a separate page is that it can be used with prealoading. In essence you click on a link and a new page with the right page name and a preloaded skeleton text will open. This would hopefully lower the threshold to writing template documentation as you no longer would have to copy that text from the {{informative template}} documentation.

In essence:

The main purpose (currently) is to see

  • If it is feasible to make a documentation template that allow for
  • One click loading of a new page with preloaded text with
  • A skeleton for writing documentation

If this _is_ feasible, the next question is:

  • If it is feasible to rewrite current documentation (about 560 pages)?
  • By hand or automated?

However, {{informative template}} is already used on about 560 pages, so it might be better to just continue using it and modify the template behavior to allow for having documentation on a separate /doc page.

TODO

  • [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=User:Johan G/Template:Informative template with preloaded text/preload text}} Create documentation]
See https://www.mediawiki.org/wiki/Manual:Creating_pages_with_preloaded_text#Loading_the_preload_file
and https://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Options_affecting_the_edit_form
Done Done
  • Parameters 1, content= and link box=
Modified to integrate with how {{Informative template}} (permalink) currently work, instead using 1 for content, doc for documentation subpage name.
Done Done
  • View, Edit, History and Purge buttons
Added them, just need to make them appear only when the documentation is transcluded
  • Separate documentation/style guide in either the documentation or as a separate page in the FlightGear wiki namespace.
  • Cleanup before copyion into {{informative template}}
  • Unknowns

It seems that to be able to add documentation through preloading, you must add it as a separate page or as a new section. Will this mean that all template documentation have to be painstakingly rewritten (that is about 560 pages currently)? If so this will probably not be feasible. :-(