Template:Signpost series/doc

From MOASSpedia
Jump to navigation Jump to search

Background

Signpost series are suites of articles published in different editions of the news outlet that cover a single topic, and can be structured together for reference by readers seeking to learn more about that topic. In the past, series were assembled manually via the now-deprecated Wikipedia:Wikipedia Signpost/Templates/Series template (a few very early series precluded this template, too, and used custom formatting that was generated on an ad-hoc basis: see for instance our series for the 2007 board elections).

This master template was introduced in March 2015 by ResMar to greatly increase the efficiency with which series may be generated and used within Signpost articles. The core of this template is Wikipedia:Wikipedia Signpost/Templates/Article list maker, a Lua-and-Python-enabled template that uses Module:Signpost and an off-wiki Pythonic web scraper to classify Signpost articles according to their topicality via "tags". This core functionality is written and maintained by Mr. Stradivarius ♪ talk ♪, and is described in more detail at Wikipedia:Wikipedia Signpost/Index. The list of valid tags is currently available at Module:Signpost/index. Efforts are underway, but not yet completed, to build a comprehensive tag browser at Wikipedia:Wikipedia Signpost/Index.

The code on this page itself actually only consists of a switch between one of few different templates. The first is the full sidebar box, {{Wikipedia:Wikipedia Signpost/Templates/Tag series}}, used to provide article linking capacity to previous stories related to the current one. The second is {{Wikipedia:Wikipedia Signpost/Templates/Tag series inline}}, used as an inline footer to Signpost stories wherever a full sidebar space is not available: see for instance here. Use-case documentation for when either of these templates is or isn't appropriate is provided in the Signpost style guidelines.

A number of more general sub-templates have been created an implemented as well, create a handful of differently visually styled template archival links for general use by the Wikipedia community, and from there, for general use by the Wikimedia community at large.

Note 1: There's a coded capacity for multiple tags to be displayed at once; however we've chosen not to code this feature into our templates, to save on the resulting conflation of tagging patterns. To use two different tag series, use two templates instead.

Note 2: Currently, inline versions of these templates invoke tags in a sandbox page. In the future, once the research index is complete, these will be replaced with links to the tag's listing in the research index, which will provide necessary meta-data about what users are looking at before they invoke series functionality.

Options

Inline and inline plain

Inline templates are meant to be used either by Signpost editors in Signpost articles. They can also be used on other pages, like Wikiproject interests in a specific topic.

If you want to create an inline template, the parameters are:

{{Signpost series
 |type=inline
 |tag=
 |tag_name=
 |tag_pretext=
 |image=
}}
  • |type= – This standard parameter for all {{Signpost series}} sub-templates allows you to select which sub-template you want: in this case, inline (or inline plain for an image-less version).
  • |tag= – The name of the tag itself as used by the Lua script. Valid tags are documented at Module:Signpost/index and, in the future, will be documented at our research index.
  • |tag_name= – The name of the tag as you want it to appear visually in the template. If left empty, the parameter entered into "tag" will be used.
  • |tag_pretext= – A grammatical parameter for use when a tag_name is better prefixed by a "the". For instance, "on the gender gap" versus "on semi-protection", as opposed to "on gender gap" versus "on the semi-protection".
  • |image= – The image placed before the text. To remove the image entirely see inline plain. The default image is File:WikipediaSignpostIcon.svg, the Signpost masthead.

Some example use-cases:

Using {{Signpost series |type=inline |tag=gendergap |tag_name=gender gap |tag_pretext=the}}
Gives tag=gendergap|tag_pretext=the|tag_name=gender gap}}

Using {{Signpost series |type=inline |tag=semi-protection}}
Gives tag=semi-protection|tag_pretext=|tag_name=semi-protection}}

Using {{Signpost series |type=inline plain |tag=semi-protection}}
Gives tag=semi-protection|tag_pretext=|tag_name=semi-protection}}

Note the use of tag_pretext in the first example.

When hosted inside the Wikipedia:Wikipedia Signpost base pagename, this template will modify its wording to reflect that:

WikipediaSignpostIcon.svg For more Signpost coverage on semi-protection see our semi-protection series.

Link

The simplest option of all—merely provides a link to the desired series invocation. It can be used for implementation in other templates or for cursory citation within discussions.

{{Signpost series
 |type=link
 |tag=
 |link_title=
}}
Using Anon, see the ''Signpost's'' {{Signpost series |type=link |tag=gendergap |link_title=gender gap}} article series.
Gives tag=gendergap|link_title=gender gap}} article series.

See more

Creates a {{sidebox}} instance that can be inserted into the end matter of on-wiki policy pages, linking to the relevant tag in question.

{{Signpost series
 |type=see more
 |tag=gendergap
 |tag_name=
 |tag_pretext=
}}
  • |type= – A standard parameter for all {{Signpost series}} sub-templates; it allows you to select which sub-template you want: in this case, see more.
  • |tag= – The name of the tag itself as used by the Lua script. Valid tags are documented at Module:Signpost/index and, in the future, at our research index.
  • |tag_name= – The name of the tag as you want it to appear visually in the template. If left empty, the parameter entered into "tag" will be used.
  • |tag_pretext= – A grammatical parameter for use when a tag_name is better prefixed by a "the". For instance, "on the gender gap" versus "on semi-protection", as opposed to "on gender gap" versus "on the semi-protection".

A use-case example:

Using {{Signpost series |type=see more |tag=semi-protection |tag_name=semi-protection}}
Gives tag=semi-protection|tag_name=semi-protection|tag_pretext=}}

Sidebar and sidebar-v2

Sidebar templates are meant to be used exclusively by Signpost staff within our own articles.

The parameters are:

{{Signpost series
 |type=sidebar-v2
 |fullwidth=
 |tag=
 |seriestitle=
 |limit=
 |sortdir=
 |image=
 |toggle_title=
}}
  • |fullwidth=yes brings a full width style, no has two-column style. By default this is set to no.
  • |type= – This standard parameter for all {{Signpost series}} sub-templates allows you to select which sub-template you want: In this case sidebar-v2. sidebar2 is deprecated, so don't use it.
  • |tag= – The name of the tag used by this series. For further information about tags see the Signpost research index.
  • |seriestitle= – A succinct title of the series. Equivalent to the tag_name inline sub-template parameter. If left empty, the parameter entered into "tag" will be used.
  • |limit= – The number of articles to include in the sidebar. By default, this is set to 5.
  • |sortdir=ascending to present articles from oldest to most recent, descending to present articles from most recent to oldest. By default, this is set to descending.
  • |image= – Changes the image displayed in the top-right corner. Not recommended when used in the Signpost.
  • |toggle_title= – If multiple sidebars for the same tag is present on the same page, clicking on 'more articles' will open all sidebars at once. While this shouldn't happen in Signpost articles, it can happen when discussing series or this template. Set the first sidebar to use |toggle_title=tag1, the second one use |toggle_title=tag2, and so on (|toggle_title= must be unspaced.)

Some example use-cases:

Using Gives
{{Signpost series
 |type=sidebar
 |tag=gendergap
 |seriestitle=Gender gap
}}
{{Wikipedia:Wikipedia Signpost/Templates/Tag series|image=|seriestitle=Gender gap|tag=gendergap|limit=5|toggle_title=gendergap|sortdir=descending}}
{{Signpost series
 |type=sidebar
 |tag=openaccess
 |seriestitle=Open access
 |limit=3
 |sortdir=ascending
}}
{{Wikipedia:Wikipedia Signpost/Templates/Tag series|image=|seriestitle=Open access|tag=openaccess|limit=3|toggle_title=openaccess|sortdir=ascending}}