Template:Excerpt tree

From Linux Web Expert

Revision as of 12:52, 22 March 2024 by imported>Sophivorus (Created page with "<includeonly><div class="ExcerptTree"> {{{1|[[{{FULLPAGENAME}}]]}}} </div>Category:ExcerptTree.js</includeonly><noinclude>{{Documentation}}</noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template documentation


Use this template gadget to navigate excerpt trees.

Usage

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

Installation

To install this template in your wiki:

  1. Create a template with any name and the following markup (you can adjust the parameter names and defaults to suit your wiki):
    <div class="ExcerptTree">
    {{{1}}}
    </div>[[Category:ExcerptTree.js]]
  2. Create MediaWiki:Gadget-ExcerptTree.js with the following code:
    /**
     * ExcerptTree.js allows to navigate excerpt trees
     * Documentation: https://www.mediawiki.org/wiki/Template:Excerpt_tree
     * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-ExcerptTree.js
     */
    mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.ExcerptTree&only=scripts' );
    
  3. Add the following gadget to MediaWiki:Gadgets-definition:
    * ExcerptTree [ResourceLoader | hidden | default | categories=ExcerptTree.js] | ExcerptTree.js
    
  4. Done! Add your template to any page to verify that the installation was successful.

Template data

<templatedata> { "description": "Use this template to navigate excerpt trees", "format": "block", "params": { "1": { "label": "Links", "description": "List of links to the roots of the excerpt trees", "type": "string", "required": true } } } </templatedata>

See also