Template:Top linked pages
This template is a template gadget. It requires the TopLinkedPages gadget to work, which is loaded automatically when this template is used. |
Use this template create a table of the most visited pages linked from a given page.
See the installation instructions to get it working in your wiki.
Usage
editBasic
editMarkup | Renders as |
---|---|
|
Loading...
|
Advanced
editMarkup | Renders as |
---|---|
|
Loading...
|
Installation
editTo 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="TopLinkedPages" data-page="{{{page|{{{1|}}}}}}" data-days="{{{days|30}}}" data-limit="{{{limit|10}}}" >Loading...</div>[[Category:Gadget:TopLinkedPages]]</includeonly>
- Create MediaWiki:Gadget-TopLinkedPages.js with the following code:
/** * TopLinkedPages creates a table of the most visited pages linked from a given page * Documentation: https://www.mediawiki.org/wiki/TopLinkedPages * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-TopLinkedPages.js */ mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-TopLinkedPages' );
- Add the following gadget to MediaWiki:Gadgets-definition:
* TopLinkedPages[ResourceLoader|hidden|default|categories=Gadget:TopLinkedPages]|TopLinkedPages.js
Done! Add your template to any page to verify that the installation was successful.
Template data
editUse this template to create a table of the most visited pages linked from a given page
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page | page 1 | Page from where to get the list of linked pages
| Page name | optional |
Days | days | How many days of stats to take into account
| Number | optional |
Limit | limit | How many pages to list
| Number | optional |
See also
edit- es:Plantilla:Páginas enlazadas más visitadas - Spanish localization of this template
- User:Sophivorus - Main author of this template