User:Pathoschild/Sandbox

From Wikipedia, the free encyclopedia

{{documentation}} was coded alongside {{documentation subpage}} to replace the several older methods. The upgrade from {{template doc}} is accidental; I didn't discover that template until I had already converted a number of pages. That said, there are a few advantages over that independently created template:

  • Bug fixes
    • integrates CSS clearing to fix display with floating elements (both inside and outside), so {{-}} or {{clear}} are no longer needed;
    • fixes a bug with previous methods wherein a "|" symbol in the documentation broke the template (cut off everything starting from the symbol);
    • automatically sorts template pages by their page name, so it's no longer necessary to override the sorting manually;
  • compatible with any namespace, so it could be used for user boxes and other pages outside the template namespace;
  • merges the functionality of {{template doc}} and {{template doc inline}};
  • simplifies usage syntax, so future functionality can be added more easily;

I'm making the two templates (documentation and documentation subpage) consistent over the several previous methods, including {{template doc}}, {{template doc inline}}, {{template doc page}}, {{{{FULLPAGENAME}}/doc}} and {{/doc}}, {{template doc page transcluded}}, and {{template doc page viewed directly}}. Eventually the other templates will redirect to the appropriate template.