Difference between revisions of "Template:Topic cat"
m (1 revision) |
|||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| width="100%" style="background-color:transparent;" | {| width="100%" style="background-color:transparent;" | ||
| style="text-align:left; width:75%;" valign="top" | | | style="text-align:left; width:75%;" valign="top" | | ||
− | This is the category for {{#if:{{{the|}}}|the}} '''{{#ifeq:{{{wikipedia}}}|no|{{{pipe|{{PAGENAME}}}}}|[[{{{target|w:{{{wikipedia|{{PAGENAME}}}}}}}}|{{{pipe|{{PAGENAME}}}}}]]}}'''{{#if:{{{intro|}}}|{{#if:{{{no comma|}}}|<span/>|,}} {{{intro}}}}}. {{#ifeq:{{{portal|}}}|no|[[Category:Topic cats with suppressed portal link]]{{#ifexist:Portal:{{PAGENAME}}|[[Category:Topic cats with existing portal]]}}|{{#ifexist:Portal:{{{portal|{{PAGENAME}}}}}|See also the '''[[Portal:{{{portal|{{PAGENAME}}}}}|{{{portal|{{PAGENAME}}}}} Portal]]'''.[[Category:Topic cats with existing portal]]}}}} [[File:Feed-icon. | + | This is the category for {{#if:{{{the|}}}|the}} '''{{#ifeq:{{{wikipedia}}}|no|{{{pipe|{{PAGENAME}}}}}|[[{{{target|w:{{{wikipedia|{{PAGENAME}}}}}}}}|{{{pipe|{{PAGENAME}}}}}]]}}'''{{#if:{{{intro|}}}|{{#if:{{{no comma|}}}|<span/>|,}} {{{intro}}}}}. {{#ifeq:{{{portal|}}}|no|[[Category:Topic cats with suppressed portal link]]{{#ifexist:Portal:{{PAGENAME}}|[[Category:Topic cats with existing portal]]}}|{{#ifexist:Portal:{{{portal|{{PAGENAME}}}}}|See also the '''[[Portal:{{{portal|{{PAGENAME}}}}}|{{{portal|{{PAGENAME}}}}} Portal]]'''.[[Category:Topic cats with existing portal]]}}}} [[File:Feed-icon.png|18px|link=https://en.wikinews.org/w/index.php?title=Special:NewsFeed&feed=atom&categories=Published%7C{{PAGENAMEE}}¬categories=No%20publish%7Cdisputed&namespace=0&count=15&ordermethod=categoryadd&stablepages=only]]{{#if:{{{usage note|}}}|<nowiki/> |
{{{usage note}}}}} | {{{usage note}}}}} | ||
Line 17: | Line 17: | ||
| style="padding-left:1em;border-right:1px dotted silver;"| | | style="padding-left:1em;border-right:1px dotted silver;"| | ||
| style="padding-left:1em; text-align:left; width:25%;" valign="top" | | | style="padding-left:1em; text-align:left; width:25%;" valign="top" | | ||
+ | |||
''From Wikinews, the free news source you can write.'' | ''From Wikinews, the free news source you can write.'' | ||
---- | ---- |
Latest revision as of 15:03, 15 October 2015
This is the category for Topic cat. Latest storiesRefresh this list to see the latest articles.
|
From Wikinews, the free news source you can write.
|
40x40px | This template is used on over 1700 pages. Changes to this template may cause some server load, and mistakes will be visible on many pages. Please carefully test any edits before making them, and avoid making unnecessary edits. |
Usage[edit]
For a typical topic category, cut and paste the following sample code, and customize it as explained below.
{{Topic cat |intro= |image= |imagecaption= |portal=no |offset={{{offset|0}}} |sisterprojects=yes |wikibooks={{PAGENAME}} |commons=Category:{{PAGENAME}} |wikidata= |wikiquote={{PAGENAME}} |wikisource={{PAGENAME}} |wiktionary={{PAGENAME}} |wikiversity={{PAGENAME}} |wikivoyage={{PAGENAME}} }}
Customizations:
- Put categories below the template. People get [[Category:News articles by person]], or some descendant like [[Category:Politicians]]; countries get [[Category:News articles by country]].
- Optionally, provide an
intro
; it completes the descriptive sentence,- This is the category for
{{PAGENAME}}
,{{{intro}}}
.
- This is the category for
- Optionally, provide an image, and perhaps a caption for the image; additional smaller images can also be included (see below).
- Check all the sister links, and adjust or remove them as appropriate.
- When looking for an alternative on any project, don't forget to check namespaces that aren't on the default search. (E.g., Wikisource default search only checks main and author.)
commons=link
overrides the default Commons link,{{PAGENAME}}
.commons=no
suppresses the Commons link entirely.wikipedia=link
overrides the default Wikipedia link,{{PAGENAME}}
.wikipedia=no
suppresses the Wikipedia link entirely.
Additional, less frequent customizations:
- An additional parameter {{{usage note}}} can be used to specify a supplementary note on how to use the category, beyond what is implied by the introductory sentence. The note is displayed as a separate paragraph after the introductory sentence.
- An additional parameter {{{the}}} can be set to non-blank, to insert the word "the" before the topic name in the descriptive sentence.
- An additional parameter {{{no comma}}} can be set to non-blank, to suppress the comma between topic and non-blank {{{intro}}} in the descriptive sentence.
- An additional parameter {{{pipe}}} can be used to specify a different name for the topic in the descriptive sentence, instead of {{PAGENAME}}.
- An additional parameter {{{target}}} can be used to specify a different target for the primary link in the descriptive sentence; if used, this replaces the entire wikipedia target, including the "
w:
", so it can link to a page on any sister project, or to a page on Wikinews. - An additional parameter {{{external}}} can be used to specify an external URL. (Use with discretion, please.)
- Any of additional parameters {{{locmap}}}, {{{coat}}}, {{{emblem}}}, {{{seal}}}, {{{flag}}} can be used to provide additional smaller images.
- An additional parameter {{{meta}}} can be used to specify a sister link to that project.
- An additional parameter {{{portal}}} can be set either to
no
, suppressing the portal link even if the portal exists; or to a different portal-space page name to use instead of{{PAGENAME}}
(so the page checked for, and linked if it exists, isPortal:{{{portal}}}
). - An additional parameter {{{nolist}}} can be set to non-blank, to suppress the list of latest news.
- Parameter {{{sisterprojects}}} can be set to
no
, or omitted, to omit the sister links section altogether. - An additional parameter {{{category}}} can be used to specify what to list under Latest stories; this should be used if the category name contains any of certain special characters, such as apostrophe, that prevent {{PAGENAME}} from generating a correct article-list due to a known bug in the wiki software.
- Removing parameter {{{offset}}} prevents the latest-article list from offering a scroll-down button.