Template talk:SectorWorlds

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search

Italic textI just noticed that Regina (world) shows up as a link on the Core Sector world listing. There may be several other instances of mis-referenced worlds on other sector listing.

Does anyone have any ideas why this maybe happening? Sstefan 11:58, 13 September 2007 (UTC)

This happens due to the line "Regina was first settled in 75 by an expedition from Aiere (1108 Core)". The reference to core here, means that the article is picked up by the template. You will see this a lot with border worlds on the sector that may have some note about a nearby planet in an adjacent sector. Currently the template chooses all worlds with a reference to the sector in question, I don't know another way to distinguish them, unless we were to add a category for each sector. Dcorrin 12:11, 13 September 2007 (UTC)
(too slow) It's a limitation of the Dynamic Page List (DPL) functionality that I used for the SectorWorlds Template. The DPL function for sector worlds says: Anything that links to this page/article which is in Category: Worlds (but not in Category: Templates). So since Regina has a link to the Core sector, it shows up in the Core sector sector worlds list.
You are correct in assuming there are other's of these "mistakes". How to fix these mistakes I'm not sure, yet. Options include:
  • Create a redirect (e.g. Core Sector (world) ->Core Sector) so any world articles go through the redirect. This means creating 266 redirects and editing affected world articles.
  • Create a category for each sector so the DPL is only pulling from the correct category. This means editing 965+ world articles to include the correct category.
  • Re-reading the DPL documentation, as I may be able to come up with something even cooler, but it's really unlikely.
Tjoneslo 12:16, 13 September 2007 (UTC)
I think I have found the solution.
The sector worlds template looks for a link to the sector page throughout the entire text of this page. This will cause the world listing to appear as part of this sector. By my estimation, we may need to scan through all of the pages to see what worlds are using links such as (Deneb Sector|Deneb) *purposely not shown as wiki link* to see if those other world lists are correct.
By eliminating the sector links within the world write-up (other than the link to the "parent" sector}; this problem may be resolved.Sstefan 12:21, 13 September 2007 (UTC)
The reference to core here is not bad. The world mentioned is in Core, and a link to the sector is normal for world references. Suppressing these links is not desirable, perhaps re-naming the template to "Worlds that reference this sector" would be more accurate, after all if you are reading up about the core, likely world articles that make a reference will be of interest. Dcorrin 12:40, 13 September 2007 (UTC)
Given the relevance of your comments; I propose a change to the template.Sstefan

Fixing the Template[edit]

I think I found a way to fix this. But it does require a policy change (and the corresponding edit of many world articles).

Policy would be as follows: All UWP template names (or primary article description) should use the {{World|...}} template. All references to worlds in the articles should use the {{WorldS|...}} template. We can have the DPL distinguish which world article is to be included based upon text in the World template.

Tjoneslo 17:56, 18 September 2007 (UTC)

{{#dpl: category=worlds
|includematch= /\{{!}}{{{1}}}\{{!}}/

Just so that I (and maybe others as well) can understand this a little better

{{World|...}} template lists world/subsector/sector; used on all library entries for systems and allows consolidating on sector pages.

{{WorldS|...}} template just lists world/sector; used as references on pages.

Have I got that right? Sstefan 19:16, 18 September 2007 (UTC)

We could generate that based on the UWP template? All worlds (should) have that only on their home pages... Dcorrin 19:29, 18 September 2007 (UTC)
Dan, You have shown that I could only see the trees.... I guess that I should have looked for the forest instead. Using the UWP may be the trick.
Thanks, Sstefan 19:33, 18 September 2007 (UTC)

The #dpl above is doing two things with the includepage={World}.dpl line. First it's looking for pages with the {{World|...}} template in it (that also link to the current page and are in the Worlds category).

Second, there is a Template: World.dpl, which takes the same parameters as the Template: World, but formats them differently for the dynamic list. That is, when the DPL code runs, is takes the World template code, and substitutes the parameters into the World.dpl template to generate the text in the list.

Thirdly, the includematch=/\{{!}}{{{1}}}\{{!}}/ is looking through the text in the World Template parameters, looking for the sector name. This is what makes sure that if Regina (world) has a link to the Core Sector, it won't show up in the Core sector list of worlds.

So, yes, the above policy restatement regarding the World/WorldS templates is correct.

Now, we could use the UWP template to match this, but as you can see above, the DPL needs text that is part of the World template to make sure that matches are the correct ones.

What I'll do if no one objects too strongly to the policy idea is to create a SectorWorlds2 template. The idea would be to put both on a sector page until all the worlds for that sector have been fixed, then to remove older sector worlds template. Tjoneslo 03:14, 19 September 2007 (UTC)

If by adding the SectorWorlds2 template to show worlds that reference the sector and SectorWorlds template to show worlds within the sector (or vice versa); it appears that we have found a workable solution. Sstefan 11:16, 19 September 2007 (UTC)