Template:Portal by year/doc
This is a documentation subpage for Template:Portal by year. It contains usage information, categories and other content that is not part of the original template page. |
This template creates the basic features of a year-based portal. Once created, such a portal will automatically keep itself up to date.
It uses Dynamic Page Lists as created for the Wikinews project, in a format based on Wikinews-style portals (eg. Portal:Aviation on Wikinews).
Usage
[edit]{{Portal by year}}
Procedure
[edit]- Start a new portal
- Copy the text template into the new portal
- Save the page
Important notes
[edit]- Any portal using this template must only use the year in the title, (ie.
Portal:1922
orPortal:1588
). The template uses the page name as the basis for the dynamic page lists. - Do not transclude this page; it should be used as described under procedure.
Amendments
[edit]It is likely that the standard set of categories within this template is inappropriate for a specific year. Therefore, after the page has been saved (as described under Procedure) it can be altered to fit the specific requirements of a specific year. It may also be useful, for aesthetic reasons, to move some sections around (which can be done by cut-and-paste) or change their length.
A sample of a section will look like this:
=== [[:Category:Poems|Poems]] === <DynamicPageList> category=Poems category={{PAGENAME}} works count=5 suppresserrors=true </DynamicPageList>
To adapt this to another use:
category=Poems
and the heading[[:Category:Poems|Poems]]
should be changed to a new category.- If necessary,
category={{PAGENAME}} works
can be changed, replacing{{PAGENAME}}
with the appropriate year. - If the year is featured in the main category, the
category={{PAGENAME}} works
line can be removed altogether.
For example, to specify the category as Modern Poetry:
=== [[:Category:Modern poetry|Modern poetry]] === <DynamicPageList> category=Modern poetry category={{PAGENAME}} works count=5 suppresserrors=true </DynamicPageList>
To lengthen the section (provided there are enough works or pages to be listed), change the number in the count=5
line to the maximum number of bullet points desired.
More information
[edit]- DynamicPageList Extension at MediaWiki
- DynamicPageList at Wikinews
- Template:Countrycategory at Wikinews (an example of a template with DynamicPageLists