Template talk:Campaignbox Congo Crisis

Page contents not supported in other languages.
Source: Wikipedia, the free encyclopedia.
(Redirected from
Template talk:Congo Crisis
)

Transclusion of templates

We have two primary templates that refer to the Congo Crisis: We have this one, we'll call it Target Template:

Then we have the original one, we call that Source Template:

The data of Source_Tempate is a sub-set of the data in Target_Template - i.e. all operations and battles of the Congo Crisis are listed in Source_Template and we re-use them in Target_Template along with other data. It does not make sense to maintain these data in two places, editors edit on one place and not the other and they are no longer in sync. Source_Template should be the sole source of data for "Operations and Battles" section, and anything changed in Source_Template should automatically update "Operations and Battles" section within Target_Template. One should do this using the "Transclusion" function - but that function seems to only work for Wiki pages and not for templates. I've been consulting on Wikipedia:Village pump (technical)#Help on "nested templates" but not gotten it to work yet.

If this does not work, we have three options:

  1. Maintain data in both Source and Target templates and leave a comment on both template page codes to ask editors to update in both places;
  2. Only use the expanded Target_Template and depreciate use of Source_Template
  3. Remove the "Operations and Battles" data from Target_Template and continue using both

Views? Farawayman (talk) 23:48, 17 June 2021 (UTC)[reply]

The Congo Crisis ended in 1965, not 1968, so the events/battles would not be fully congruent. -Indy beetle (talk) 01:47, 18 June 2021 (UTC)[reply]
We will limit the Congo Crisis by date range, and one can still add to the second list, over and above the transclusion list. Farawayman (talk) 18:01, 18 June 2021 (UTC)[reply]
See {{
Congo Crisis}}. The code uses a sandbox module so if this was the approach taken it would need some changes. But I think it shows that what you want to do is possible. —  Jts1882 | talk  14:30, 18 June 2021 (UTC)[reply
]
Jts1882 This is exactly what we want! Excellent, what's now needed to make that happen outside of the sandbox version? Farawayman (talk) 18:01, 18 June 2021 (UTC)[reply]
I've found an existing template/module ({{
Congo Conflict: 1960–1968}}. Note I've wrapped the comment in this template with <noinclude> tags to prevent the "and" within the section tags mentioned in the comment being transcluded. —  Jts1882 | talk  08:04, 19 June 2021 (UTC)[reply
]
Jts1882 - Well done! Works perfectly. Thanks Jts1982!