From Fedora Project Wiki

Revision as of 12:43, 1 September 2021 by Ferdnyc (talk | contribs) (→‎Template enhancements: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template enhancements

Assuming I coded it all correctly — a bit of a leap, but I'll check as soon as I save (and fix anything that broke) — I've just installed a few nice enhancements to this template, borrowed from this old revision of their Template:Documentation. (Back before it went all complicated and multi-transcluded, and then became a Lua module.)

With the updated template, it should be possible to:

  1. Transclude a page other than the /doc subpage of the template you're documenting, by passing the pagename as the first unnamed parameter to Template:documentation. e.g:


    to reuse its documentation with a different template.
  2. Pass a heading= parameter, to replace the default Template documentation title in the transcluded box.
  3. Pass a content= parameter containing the literal documentation content to display, so you can take advantage of the blue-box styling without having to create a separate /doc page for simple cases.

When content= is used, the no-longer-relevant parts of the documentation box (the edit link, mention of the content being transcluded from a subpage, etc...) will automatically be suppressed.

While I was there I also streamlined the markup a bunch. Let me know if there are any problems. -- Ferdnyc (talk) 12:43, 1 September 2021 (UTC)