Difference between revisions of "Template:SectorWorlds2"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
Line 10: Line 10:
 
  |noresultsheader=<div style="padding-top: 0.2em; padding-bottom: 0.2em; background:#ccccff; font-weight:bold">No world articles for this {{{2|Sector}}}</div>
 
  |noresultsheader=<div style="padding-top: 0.2em; padding-bottom: 0.2em; background:#ccccff; font-weight:bold">No world articles for this {{{2|Sector}}}</div>
 
  |format=<div style="font-size: 90%; padding: 0.5em 1em">,,&nbsp; &bull; &nbsp;,</div>
 
  |format=<div style="font-size: 90%; padding: 0.5em 1em">,,&nbsp; &bull; &nbsp;,</div>
  |includematch=/\{{!}}Gulf*\{{!}}/
+
  |includematch=/\{{!}}{{#if: {{{name|}}}|{{{name}}}*{{!}}|
 +
      {{#if: {{{1|}}}|({{{1}}}{{#if: {{{2|}}}|{{!}}{{{2}}}|}})|}}}}\{{!}}/
 
  |titlematch=%(world)
 
  |titlematch=%(world)
 
  |linksto={{{1|Uncharted}}}_{{{2|Sector}}}}}
 
  |linksto={{{1|Uncharted}}}_{{{2|Sector}}}}}
  |includematch=/\{{!}}{{#if: {{{name|}}}|{{{name}}}*|
+
  |includematch=/\{{!}}{{#if: {{{name|}}}|{{{name}}}*{{!}}|
 
       {{#if: {{{1|}}}|({{{1}}}{{#if: {{{2|}}}|{{!}}{{{2}}}|}})|}}}}\{{!}}/
 
       {{#if: {{{1|}}}|({{{1}}}{{#if: {{{2|}}}|{{!}}{{{2}}}|}})|}}}}\{{!}}/
|includematch=/\{{!}}Gulf*\{{!}}/
 
 
</div><noinclude>
 
</div><noinclude>
 
This template list in a navigation box, lists all of the [[:Category: Worlds|Worlds]] in the wiki that link to the sector name page(s), and have a [[:Template: World]] with a parameter matching the first, third, fourth, or fifth parameter of this template.
 
This template list in a navigation box, lists all of the [[:Category: Worlds|Worlds]] in the wiki that link to the sector name page(s), and have a [[:Template: World]] with a parameter matching the first, third, fourth, or fifth parameter of this template.

Revision as of 01:08, 22 January 2014

<div style="padding-top: 0.2em; padding-bottom: 0.2em; background:#ccccff; font-weight:bold">No world articles for this Sector</div>{{Extension DPL}}
|includematch=/\|\|/

This template list in a navigation box, lists all of the Worlds in the wiki that link to the sector name page(s), and have a Template: World with a parameter matching the first, third, fourth, or fifth parameter of this template.

Usually this is used for the Sector articles to allow creating a list of all the worlds within the particular sector. It can also be used to list worlds in a Subsectors as well.


{{SectorWorlds2
 |<Primary Sector|Subsector name>
 |Sector|Subsector {Area to match}
 |<Second  Sector|Subsector name>
 |<Third Sector|Subesctor name>
 |<Fourth Sector|Subsector name>
}}

The primary sector|subsector name is where you supply the name of the Sector (or Subsector) page where this navigation box belongs. Note: You can place the navigation box on a different page than the Sector/Subsector page. For example, if you want a list of worlds in X sector but on page Y, include this template, but simply set the first parameter to X.

The title of area allows you to change the "Sector" in the title to "Subsector" or "Domain" as needed. The area title defaults to Sector.

The Second, Third, and Fourth names are for sectors (or subsectors) which are claimed by two (or three) empires and hence have two (or three or four) names.

You can also match worlds in multiple sectors (or subsectors) at the same time, simply by including each of the sectors or subsectors.

This is an update of the Template: SectorWorlds. That template suffers from the problem if a world article is linked to more than one sector (via a link in the article), it shows up in the wrong list.

This template requires that the World article page have exactly one Template:World containing the name of the world and sector/Subsector where it is found. All remaining links must use either normal links or Template: WorldS. This isn't true of many of the World articles (at this time this was written). So when replacing the SectorWorlds template with this template, you will need to verify and update all the world articles.

This template may also produce red-links. This is caused by an world article using a {{World|...}} template to refer to a red-link world and to the sector page in question. These also need to be fixed.

This template may also have a red-link to a "Template:World.dpl.default". This is caused by there being an article in the Category:Worlds linked to the sector that does not have a {{World|...}} template in the article.

In general, adding a Template:SectorWorlds to the article and then verifying that each article meets the formatting requirements above will resolve these last two issues.

This requires the #dpl (DynamicPageList) parser function