Difference between revisions of "Template:Geological category see also/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Hike395
m (tweak)
imported>Hike395
(sync)
Line 2: Line 2:
 
|Early|Middle|Late={{Geological category see also/core
 
|Early|Middle|Late={{Geological category see also/core
 
|base_cat={{#invoke:String|match|s={{{1|{{BASEPAGENAME}}}}}|^[^%s]*%s+[^%s]*}}
 
|base_cat={{#invoke:String|match|s={{{1|{{BASEPAGENAME}}}}}|^[^%s]*%s+[^%s]*}}
|cat_suffix={{#invoke:String|replace|source={{{1|{{BASEPAGENAME}}}}}|pattern=^[^%s]*%s+[^%s]*|replace=|plain=false}}}}
 
|Extant={{Geological category see also/core
 
|base_cat={{#invoke:String|match|s={{{1|{{BASEPAGENAME}}}}}|start=8|^[^%s]*}}
 
 
|cat_suffix={{#invoke:String|replace|source={{{1|{{BASEPAGENAME}}}}}|pattern=^[^%s]*%s+[^%s]*|replace=|plain=false}}}}
 
|cat_suffix={{#invoke:String|replace|source={{{1|{{BASEPAGENAME}}}}}|pattern=^[^%s]*%s+[^%s]*|replace=|plain=false}}}}
 
|{{Geological category see also/core
 
|{{Geological category see also/core
 
|base_cat={{first word|{{{1|{{BASEPAGENAME}}}}}}}|cat_suffix={{remove first word|{{{1|{{BASEPAGENAME}}}}}}}}}}}<noinclude>{{documentation}}</noinclude>
 
|base_cat={{first word|{{{1|{{BASEPAGENAME}}}}}}}|cat_suffix={{remove first word|{{{1|{{BASEPAGENAME}}}}}}}}}}}<noinclude>{{documentation}}</noinclude>

Revision as of 06:42, 18 January 2018

Template documentation[view] [edit] [history] [purge]

Usage

{{Geological category see also}} will automatically generate a see also list of two categories: one for the previous time span and one for the next.

For example, on Category:Jurassic animals, the template will generate:


The template auto-detects whether a category exists: if a category is missing, or there is no future or past time span, it will only list one category. e.g., on Category:Quaternary genera, the template will generate: