Template:Creature Navbox: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(fix typo)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{Navbox
<includeonly>{{Navbox
| name      = Creature Navbox
| name      = Creature Navbox
| title      = Creatures in the [[{{{1|}}}]] Faction
| title      = Creatures in the {{#cargo_query:|tables=Factions|fields=CONCAT('[[',PlainName,'{{!}}',PlainName,']]')|where=PlainName='{{#replace:{{{1|}}}|'|\'}}'|limit=1|more results text=}} Faction
| listclass  = hlist
| listclass  = hlist
| state      = {{{state|collapsed}}}
| state      = {{{state|collapsed}}}
| titlestyle = background:rgba(6,28,23,0.9); font-family:Source Code Pro;
| titlestyle = background:rgba(8,51,50,0.8); font-family:Source Code Pro;
| groupstyle = background:rgba(6,28,23,0.8); font-family:Source Code Pro;
| groupstyle = background:rgba(8,51,50,0.8); font-family:Source Code Pro;
| liststyle = padding:0.6em;
| liststyle = padding:0.6em;
| innerstyle = font-family:Source Code Pro;
| innerstyle = font-family:Source Code Pro;


| group1style = background:rgba(6,28,23,0.2);
| group1 = {{#if: {{{splitbycategory|}}} | {{{categorytitle|{{{splitbycategory}}}}}} | {{#ifeq:{{{2|}}}|uniquecommon| Unique }} }}
| group1 = {{#if: {{{splitbycategory|}}} | {{{categorytitle|{{{splitbycategory}}}}}} | {{#ifeq:{{{2|}}}|uniquecommon| Unique }} }}
| list1  = {{#if: {{{splitbycategory|}}} | {{Creature navbox query|{{{1|}}}|category={{{splitbycategory}}}}} | {{Creature navbox query|{{{1|}}}|{{#ifeq:{{{2|}}}|uniquecommon|unique}}}} }}
| list1  = {{#if: {{{splitbycategory|}}} | {{Creature navbox query|{{{1|}}}|category={{{splitbycategory}}}}} | {{Creature navbox query|{{{1|}}}|{{#ifeq:{{{2|}}}|uniquecommon|unique}}}} }}


| group2 = {{#if: {{{splitbycategory|}}} | {{{noncategorytitle|General}}} | {{#ifeq:{{{2|}}}|uniquecommon| Common}} }}
| group2 = {{#if: {{{splitbycategory|}}} | {{{noncategorytitle|General}}} | {{#ifeq:{{{2|}}}|uniquecommon| Common}} }}
 
| list2style = background:rgba(0,0,0,0.2);
| list2= {{#if: {{{splitbycategory|}}} | {{Creature navbox query|{{{1|}}}|notcategory={{{splitbycategory}}}}} | {{#ifeq:{{{2|}}}|uniquecommon| {{Creature navbox query|{{{1|}}}|common}} }} }}
| list2= {{#if: {{{splitbycategory|}}} | {{Creature navbox query|{{{1|}}}|notcategory={{{splitbycategory}}}}} | {{#ifeq:{{{2|}}}|uniquecommon| {{Creature navbox query|{{{1|}}}|common}} }} }}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
Line 33: Line 32:
{{Creature Navbox|Barathrumites|uniquecommon}}
{{Creature Navbox|Barathrumites|uniquecommon}}
=== Category-Divided Case ===
=== Category-Divided Case ===
<pre>{{Creature Navbox|Cherubim|splitbycategory=Cherubim|categorytitle=Cherubim|noncategorytitle=Mechanical Cherubim}}</pre>
<pre>{{Creature Navbox|Robots|splitbycategory=Turrets|categorytitle=Turrets|noncategorytitle=General}}</pre>
{{Creature Navbox|Cherubim|splitbycategory=Cherubim|categorytitle=Cherubim|noncategorytitle=Mechanical<br>Cherubim}}
{{Creature Navbox|Robots|splitbycategory=Turrets|categorytitle=Turrets|noncategorytitle=General}}
</noinclude>
</noinclude>

Latest revision as of 17:06, 21 February 2022

Template that makes a navigation box for the specified faction. The first argument should be the Faction name.

Optionally:

  • A second argument of uniquecommon can be specified to separate the navbox into two rows; one for unique characters, one for non-unique characters.
  • The following parameters can be specified to divide the navbox into two category-based rows:
    • splitbycategory: The category by which to split the navbox
    • categorytitle: Creatures that have the specified category as their primary (cargo-stored) category will be put in the first row of the navbox, and that row will have the title specified in this parameter
    • noncategorytitle: All other creatures (not in the specified category) will go into the second navbox row, and that navbox row will have the title specified here.

Simple Case

{{Creature Navbox|Barathrumites}}

Unique / Common Case

{{Creature Navbox|Barathrumites|uniquecommon}}

Category-Divided Case

{{Creature Navbox|Robots|splitbycategory=Turrets|categorytitle=Turrets|noncategorytitle=General}}