Misplaced Pages

Template:NYCS time 2: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 08:04, 2 March 2010 view sourceTinlinkin (talk | contribs)Pending changes reviewers10,300 edits adding "nolink" option← Previous edit Revision as of 12:02, 7 April 2010 view source Tinlinkin (talk | contribs)Pending changes reviewers10,300 edits Add for 2nd param in {{NYCS-bull-small}}; should only affect the shuttlesNext edit →
Line 1: Line 1:
{{#ifeq:{{{time|}}} | bullets | {{NYCS-bull-small|{{{1}}}}}{{#if:{{{dicon|}}}| {{NYCS-bull-small|{{{1}}}d}}|}} | {{#switch: {{{time|}}} |color |colorshow= {{color box|#{{NYCS color|{{{1}}}}}}} |}} {{#if:{{{text|}}} | {{#ifeq: {{{time|}}} | nolink | {{{1}}} {{#if: {{{link|}}}| ({{{link|}}}) }} | ]}}{{#switch:{{{time|}}} {{#ifeq:{{{time|}}} | bullets | {{ NYCS-bull-small | {{{1}}} | {{{link|}}} }}{{#if:{{{dicon|}}}| {{NYCS-bull-small|{{{1}}}d}}|}} | {{#switch: {{{time|}}} |color |colorshow= {{color box|#{{NYCS color|{{{1}}}}}}} |}} {{#if:{{{text|}}} | {{#ifeq: {{{time|}}} | nolink | {{{1}}} {{#if: {{{link|}}}| ({{{link|}}}) }} | ]}}{{#switch:{{{time|}}}
|1 |1
|show |show

Revision as of 12:02, 7 April 2010

Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 3,100 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

Usage

This template formats the services that operate on a New York City Subway line. It should never be used directly, but rather through line templates.

Syntax

{{ NYCS time 2 |1=<subway service>|<page to link to>|<time period icon>|<description of time period>|<time period icon for express service>|<description for time period, express service>|time={{{time|}}} }}

Of these parameters, unnamed parameter, icon, text and time are required. In addition, time must have the value {{{time|}}}, as in time={{{time|}}}. This last parameter allows the template to output different styles.

  • Unnamed parameter (or 1): subway service (ex. 7)
  • link: What page to link to (ex. IRT Flushing Line) (if not provided, links to the service page)
  • icon: What icon to show in the service time description. Use standard names. (ex. alltimes shows )
  • text: description of service pattern. Should be a readable version of icon (ex. All times)
  • dicon: Same as icon, but for diamond service.
  • dtext: Same as text, but for diamond service.
  • time: Display method. Passed through to article, use in article can be color, show, colorshow, box, full, text, nolink, or blank (nolinkatall is an additional option used in {{NYCS trains}} only).
  • punct: Allows the template to be configured into a comma, serial comma, or the conjunction "and" if the |time= parameter is equal to "nolink" or is blank. The options for |punct= are , (for comma), ,and (for serial comma), and and (for conjunction), respectively. See this discussion for a detailed explanation.

For example, this is the template with the info described above. ({{NYCS Flushing}})

{{NYCS time 2|7|icon=alltimes|dicon=rushpeak|text=All times|dtext=rush hours in peak direction only|time={{{time|}}}}}

time= boxfull boxtext boxshow box
Result 7 <7> 7 <7> 7 <7> 7 <7>
time= bulletfull bullettext bulletshow bullets
Result 7 <7> 7 <7> 7 <7> Template:NYCS-bull-small Template:NYCS-bull-small
time= color colorshow
Result    7  (All times) <7>(rush hours in peak direction only)    7  <7>
time= full text show bold
Result 7  (All times) <7>(rush hours in peak direction only) 7 (All times) <7>(rush hours in peak direction only) 7  <7> 7 <7> 7 <7>
time= nolink boldnolink
or nolinkbold
Result 7 <7> 7 <7>

See also

The above documentation is transcluded from Template:NYCS time 2/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Category: