Template talk:Chronostratigraphy navbox

(Redirected from Template talk:Chronostratigraphy navbox/testcases)
Latest comment: 6 years ago by J. Spencer in topic Archean not appearing?

@Abyssal: I am not a template guru but I hope this helps.

The sections appear if list1=something and disappear if list1 is blank. They're appearing and disappearing correctly at the finest level, but above that we have the problem that list1=(a subgroup with blank lists), and that's not blank. One solution might be:

... {{#if:{{{Tarantian|{{{Ionian|{{{Calabrian|{{{Gelasian}}}}}}}}}}}} | (Pleistocene bit goes here) | }} ...

Wider strata will need longer conditions with more substrata, and that's going to get very long-winded when we get up to the Phanerozoic.

Alternatively, a Lua module rather than a template may help. The de luxe solution is to enhance {{Navbox}}, or rather the Lua module beneath it, to treat a table for a subgroup with no text as if it were an empty list item. That could fix a lot of similar problems elsewhere but would have to be an optional flag as it's not backwards compatible.

By the way, some may find text on those background colours hard to read. Certes (talk) 15:42, 16 November 2017 (UTC)Reply

@Certes: Thanks for the help, Certes. I tried placing your code in the template. It made the Pleistocene cell disappear, but when I tried to input some values for one of the Pleistocene substages it won't show up again. Did I insert the code into the template incorrectly? Abyssal (talk) 16:01, 16 November 2017 (UTC)Reply
How did you "input some values"? I think we're at the stage where we need to split this into a template (here) and another page which calls it and provides parameters like "West Virginia". A /testcases subpage could do that. By the way, can text appear for Pleistocene itself, rather than just its substages? If so then we'll need to add Pleistocene itself to the #if: list. Certes (talk) 16:20, 16 November 2017 (UTC)Reply
@Certes:I inputted values with this code: {{Stratigraphic column navbox|Tarantian=Doo doo doo}} Splitting this template up might be a good idea. I tried it before, but got intimidated by the complexity and this. A test page would probably be really helpful. Yes, text for Pleistocene can show up under the substages (for strata that can't be dated more specifically). Abyssal (talk) 16:32, 16 November 2017 (UTC)Reply
@Abyssal: this didn't gain consensus, so let's read it but feel free to ignore it where necessary. I think we'll need our own subgroup subtemplate, even if it's just a call to {{Navbox subgroup}} with a big "#if:list1 or list2..." statement around it. I'll have a hack and see what I can do, first with /subgroup and /testcases then later with the template itself. Certes (talk) 16:40, 16 November 2017 (UTC)Reply

@Abyssal: I think this is finally working in the sandbox. See Template:Stratigraphic column navbox/testcases, which has the sandbox version on the right. You could add a few more testcases. If they look good then the sandbox can be copied and pasted to the main template. I've created a subgroup template, which really has nothing to do with stratigraphic columns but forces the empty sections to go away if they have no descendents. Certes (talk) 17:55, 16 November 2017 (UTC)Reply

@Certes:Wow. That looks really good. Let me try a more detailed test on my userpage. Abyssal (talk) 17:58, 16 November 2017 (UTC)Reply
@Certes: I've tested it on my user page and didn't find any problems. I am incredibly impressed. The only thing I can think of that might improve it would be is if you could interchangeable use terms like "Early Jurassic" and "Lower Jurassic", "Late Cretaceous" and "Upper Cretaceous". Is there a way to implement that? Abyssal (talk) 18:12, 16 November 2017 (UTC)Reply
Great! If you want editors to have a choice of which period name to display, just add both "Early Jurassic" and "Lower Jurassic" as if they were consecutive subperiods within Jurassic. If used sensibly, only one will appear on any given page, so ordering doesn't matter. No changes needed to the subtemplates. Certes (talk) 19:10, 16 November 2017 (UTC)Reply

Archean not appearing?

edit

I was editing the Minnesota version, and I noticed that the Archean entries were not showing. Is that due to a technological limitation, an error on the Minnesota template, or an error on the main template? J. Spencer (talk) 20:34, 7 July 2018 (UTC)Reply