Jump to content

Template:Excerpt tree

From wikiNonStop
Revision as of 14:35, 7 October 2024 by en>Sophivorus (Add "Gadget:" prefix and remove ".js" suffix to categories for loading gadgets, for a category naming convention that is hopefully a bit more clear and consistent)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation

Use this template to navigate excerpt trees.

See the installation instructions to get it working in your wiki.

Usage

Markup Renders as
{{Excerpt tree|
* [[Architecture Repository]]
* [[Platform Engineering Team]]
}}

Installation

To install this template in your wiki:

  1. Create a template with the following markup. You can choose the template name, parameter names and defaults to suit your wiki.
    <syntaxhighlight lang="php"></syntaxhighlight><includeonly><div class="ExcerptTree">
    {{{1|[[{{FULLPAGENAME}}]]}}}
    </div>[[Category:Gadget:ExcerptTree]]</includeonly>
    
  2. Create MediaWiki:Gadget-ExcerptTree.js with the following code:
    /**
     * ExcerptTree enables navigation of excerpt trees
     * Documentation: https://www.mediawiki.org/wiki/ExcerptTree
     * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-ExcerptTree.js
     */
    mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-ExcerptTree' );
    
  3. Add the following gadget to MediaWiki:Gadgets-definition:
    * ExcerptTree[ResourceLoader|hidden|default|categories=Gadget:ExcerptTree]|ExcerptTree.js
    

Done! Add your template to any page to verify that the installation was successful.

Template data

Use this template to navigate excerpt trees

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Links1

List of links to the roots of the excerpt trees

Stringrequired

See also