Template:Short linked pages/doc
This is a documentation subpage for Template:Short linked pages. It contains usage information, categories and other content that is not part of the original Template page. |
This template is a template gadget. It requires the ShortLinkedPages gadget to work, which is loaded automatically when this template is used. |
Use this template to produce a list of short pages out of those linked from a given page. This template was originally meant to be useful in wikiprojects to produce a list of pages that need expansion out of a list of pages relevant to the wikiproject.
See the installation instructions to get it working in your wiki.
Usage
[edit]Basic
[edit]Markup | Renders as |
---|---|
|
Loading...
|
Advanced
[edit]Pages linked from Global templates that have the Template:Update, including an link to edit them.
Markup | Renders as |
---|---|
|
Loading...
|
Installation
[edit]To install this template in your wiki:
- Create a template with the following markup. You can choose the template name, parameter names and defaults to suit your wiki.
<includeonly><div class="ShortLinkedPages" data-page="{{{page|{{{1|}}}}}}" data-namespace="{{{namespace|*}}}" data-limit="{{{limit|10}}}" data-editlink="{{{editlink|}}}" data-editintro="{{{editintro|}}}" >Loading...</div>[[Category:Gadget:ShortLinkedPages]]</includeonly>
- Create MediaWiki:Gadget-ShortLinkedPages.js with the following code:
/** * ShortLinkedPages creates a list of the shortest pages linked from a given page * Documentation: https://www.mediawiki.org/wiki/ShortLinkedPages * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-ShortLinkedPages.js */ mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-ShortLinkedPages' );
- Add the following gadget to MediaWiki:Gadgets-definition:
* ShortLinkedPages[ResourceLoader|hidden|default|categories=Gadget:ShortLinkedPages]|ShortLinkedPages.js
Done! Add your template to any page to verify that the installation was successful.
Template data
[edit]Use this template to produce a list of short pages out of those linked from a given page
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page | page | Page from where to get the list of linked pages
| Page name | required |
Namespace | namespace | Namespace number to which to limit the listed pages. Use * for all.
| Number | optional |
Limit | limit | Max number of pages to list
| Number | optional |
Edit link | editlink | Whether to show a link to edit the listed pages
| Boolean | optional |
Edit intro | editintro | Page with an edit intro to show when the editor loads | Page name | optional |
See also
[edit]- es:Plantilla:PƔginas enlazadas cortas - Spanish localization of this template
- User:Sophivorus - Main author of this template