Difference between revisions of "Template:Geological category see also/sandbox"
Jump to navigation
Jump to search
imported>Hike395 (sync) |
imported>Hike395 (wrap in toc div?) |
||
| Line 1: | Line 1: | ||
| − | {{#switch:{{first word|{{{1|{{BASEPAGENAME}}}}}}} | + | <div class="toc">{{#switch:{{first word|{{{1|{{BASEPAGENAME}}}}}}} |
|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}}}} | |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}}}}}}}}}}}</div><noinclude>{{documentation}}</noinclude> |
Revision as of 09:31, 18 January 2018
| This is the template sandbox page for Template:Geological category see also (diff). See also the companion subpage for test cases. |
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:
| The above documentation is transcluded from Template:Geological category see also/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |