Template:Signpost/snippet/doc

From Wikipedia, the free encyclopedia
Sandbox transclusion

asdfasdfasdf

asdfasdfasdf

This template is used on Wikipedia:Wikipedia Signpost, Wikipedia:Wikipedia Signpost/Templates/Issue, and Wikipedia:Wikipedia Signpost/Next issue. It is also on many userpages, which transclude the Signpost with {{Wikipedia:Wikipedia Signpost}}. It is used to generate individual snippets that link to articles. It takes the following parameters:

{{Signpost/snippet
 |1                  = <!-- Issue date -->
 |2                  = <!-- Department -->
 |3                  = <!-- Title      -->
 |4                  = <!-- Subheading -->
 |5                  = <!-- Page size  -->
 |piccyfilename      = 
 |piccy-credits      = 
 |piccy-license      = 
 |piccy-scaling      = 
 |piccy-xoffset      = 
 |piccy-yoffset      = 
}}
  • {{{1}}}: Issue date, like 2022-05-29. This is part of the name of the pages it links to.
  • {{{2}}}: Department, like "Opinion". This is also part of the page names. {{{1}}} and {{{2}}} are combined, for example, to link to Wikipedia:Wikipedia Signpost/2022-05-29/Opinion.
  • {{{3}}}: Title. This is defined by input, and not taken from the article page itself: the article could be titled "A serious look at the crisis facing us" in its own code, and you could type "hoomba baroomba" into this parameter when invoking the snippet template, and the snippet would say "hoomba baroomba".
  • {{{4}}}: Blurb, or subheading. This is a short descriptive sentence which serves as a hook for the article.
  • {{{5}}}: Page size. This is something like "0.5 MB". In the template output, it links to a PDF download.

{{{1}}} and {{{2}}} are required; {{{3}}} is optional (it will show "No title/Not yet started" if not supplied). {{{4}}} is optional (it will show "No blurb" if not supplied). {{{5}}} is entirely optional (it will simply not show a PDF link if not supplied).

If {{ROOTPAGENAME}} is "Wikipedia Signpost", it adds __NOTOC__ and __NOEDITSECTION__ to suppress the auto-generation of a table of contents and section edit links (this is to allow the template to be embedded on userpages and the like).

TemplateStyles are drawn from Template:Signpost/snippet/styles.css.

With respect to HTML, it does this:

  • It creates a <div> with the class signpost-snippet plainlinks. This encloses everything (i.e. the whole snippet).
  • It creates another <div>, signpost-snippet-department</code>, which contains the department name (from the second unnamed parameter).
  • The third <div> is signpost-snippet-title and the title (from the third unnamed parameter). This title is a link to the Signpost page itself.
  • It creates a <span> with the class signpost-snippet-hook. This contains the blurb (from the fourth unnamed parameter). It is not linked to anything.
  • It creates a <span> with the class signpost-snippet-continued. This contains a link to the article itself.
  • Optionally, if {{{5}}} (article size) is supplied, it will link to a PDF. There is no div class for this link.

Nopic[edit]

Template:Signpost/snippet-nopic is the same template as this, but doesn't have pics for the articles. This can be used on old pages, like archives etc, where the articles don't have pics.

Potpourri[edit]

  • As of 03:35, 4 December 2023 (UTC) it has a (somewhat halfassed) interpretation of a pic param which it displays above the entry.
  • This may seem like a very high-use template, and it does have a lot of transclusions, but almost all of these are from people transcluding the WP:SIGNPOST main page. Actual insource searches reveal that this template is basically only ever used on the main Signpost page.