User:Djonni/Template sandbox

From GodWiki
< User:Djonni
Revision as of 07:48, 3 November 2019 by Djonni (talk | contribs) (Typo)
Jump to: navigation, search
Deities of Godville
Djonni/Template sandbox 
📚 Documentation

Example, for editing and testing.



{{User:Djonni/Template sandbox
|highlighthex = #FFDD88
|title = God
<!--|name = Djonni-->
|postnomial = the Incredible
|subheader=This is a subheader.
|caption = This is a caption.
|temple = 23rd of January, 2015
|animalist = 2nd of December, 2018
|ark = 2nd of March, 2019
|avatar = Moloch_the_god.gif
|hero = Djonniboy
|herolabel = Champion
|gender = Divine
|guild = James' Guild
|position = Door Greeter
|rank = Recruit
|personality = Adjective 
|domain = God of booped noses
|motto = Would I lie to you?

|pantheonsubheaders = blah
|gratitude = 2
|might = 3
|templehood = 4
|gladiatorship = 5
|storytelling = Storytelling text.

|mastery = 11
|construction = 12
|taming = 13
|survival = Fourteen
|savings = 15
|creation = {{ordinal|16}}, but I deserve to be {{ordinal|1}}
|destruction = 17
|arkeology = 18
|catch = 19
|duelers = 20

|below = This is a below.

<!--|guildhighlighthex = #FFAA77-->
|guildheadercolor = lightcoral
|guilddatacolor = lightblue
|guildbordercolor = slateblue
<!--|pantheonhighlighthex = #77AAFF-->
|pantheonheadercolor = pink
|pantheondatacolor = orange
|pantheonbordercolor = purple

|customhighlighthex =#66FFBB

|customsection = Custom section
|customemoji = ⚔️
|customimage = Example-simple.png
|customcaption = Custom caption.
|customheader1 = Custom header 1.
|customlabel1 = This won't appear
|customdata1 = because customerheader1 is set.
|customlabel2 = Label 2
|customdata2 = Data 2
|customlabel3 = Label with no data
|customdata3 = 
|customdata4 = Data with no label

This template is now in a stable final draft. I encourage you to use and test it, and though things may be fixed or tweaked, there are unlikely to be major changes for now. Future expansions are being considered, but should not change existing behaviour in meaningful ways.

If you want to look at existing examples and tests, this is a list of pages (therefore users) that link to this page:

I have incorporated all variables used in {{Usergod}}, so that this can be a drop-in replacement. I have made a limited survey how this might affect examples of existing pages using {{Usergod}} here, and overall I'm pretty happy with the results.

All parameters below are optional. If no parameters are supplied at all, only the header with the name of the current page styled as a {{god}} link will be shown.

Basic parameters

A title to place before the God's name. In the example above, |title=God
The name of the God. This is only required if the current {{PAGENAME}} is not what you want displayed for the God's name. If set, literal contents will be displayed instead of using {{God|{{PAGENAME}}}}, so can be used to disable the link to user's Godville page if desired.
These will render as medals in the header after the god name, either within the {{God}} template or after the contents of the {{{name}}} parameter if supplied. See {{God/Documentation}} for more details.
A title for after the God's name. In the example above, |postnomial=the Incredible.
As per {{infobox}}, a subheader can be placed immediately below the header, above the image.
As per {{Usergod}}. Supply an image name for your avatar. In the example above, |avatar=Moloch_the_god.gif. Note that this doesn't need [[File:Moloch_the_god.gif|thumb...]] and all that, you'll end up with a weird result. Just give it the file name and trust the template to format your picture for you.
A caption that will appear underneath the avatar image.
All as per existing {{Usergod}}, see {{Usergod/Documentation}} for more details.
If supplied, the contents of this parameter will replace Hero: or Heroine: in the label column. So, in the above example, |herolabel=Champion results in Champion:   Djonniboy
Your "domain", your area of influence in the world (whichever world you like).
As per {{infobox}}, anything set here will appear at the very bottom of the infobox. In the example above, |below=This is a below.

Guild section

A position in a guild's organisation.
Guild rank.

Pantheon section

Long Term


Short Term

If any of these parameters is given just a numeric value (for example, |might=1234), it will display a link to the pantheon position by calling {{Pantheon link|text=none|plain=yes|pantheon|number}}, like so: 1234th. If provided with any non-numeric value, the value of the parameter will be displayed exactly as given. So, if |might=text or templates, the cell will display text or templates.
pantheonsubheaders = yes/no
This parameter can be used to switch the Long Term and Short Term subheaders on or off. If |pantheonsubheaders=yes (or any yes-like value), a subheader will be displayed if any parameters of that type are given. |pantheonsubheaders=no (or any no-like value) will turn the subheaders off. The default behaviour is that the subheaders will appear if at least one from both pantheon groups is shown. Use this if you only supply a couple of pantheons and don't want the headers, or if you definitely want the subheader to appear even if you only supply pantheons of one kind.

Custom section

This template allows you to create your own custom section appearing at the bottom of the infobox, displaying anything you like, any way you like. Uses for this are unlimited, but might include:

  • Embedding your hero information into your god infobox
  • Details of the various aspects and manifestations your divinity takes on in the world
  • A list (or table of badges) of your in-game achievements
  • Details of your role-playing character(s) in the forums
  • Or anything at all that you can think of.

Because the custom section is highly configurable, it allows you to set your own headers, labels, and data fields, and also allows for the display of one image with caption.

Text for the custom section header.
An emoji to appear to the left of the customsection header, if desired (e.g., |customemoji=⚔️. This will be keep the header text correctly balanced in the center. If you only want the custom section header to be an emoji, set it with customsection (e.g., |customsection=🌙.
An image and caption to appear immediately below the custom header.
Labels and data to appear in rows 1-40. These can be set in any combination:
  • If a label parameter is set but the data is not supplied for that row, it will not appear.
  • If a data parameter is set without a label, it will take up the entire row. (For example, the guild name takes up a whole row this way.)
  • If label and data parameters are set for a row, they will both appear.
  • If a header is set for a row, it will appear instead of any label or data values supplied for that row, which will not be seen.
See the example above for an example. |customheader1=Custom header 1. appears instead of |customlabel1=... or |customdata1=....

Colour and style

A note on links: Unfortunately, there's no way I know to change the colours of the links in the infobox. Whatever colour scheme you decide on, the links will always be the same blue and red colours as they are everywhere on the wiki. If you know of a clever way to successfully change the link colours in the infobox, please let us know and show us a working example, and I'll incorporate the changes into this template. But as fas as I know, it's not possible. Sorry!

If you give this parameter a six-character hex code in #RRGGBB format, it will create a simple colour scheme for the whole table. The colour given will be set as the header and label colour, and lighter version of it will be used for the data cells and internal borders. In the example above, |highlighthex=#FFBB88.
Sets a color for the background of the whole infobox. This color will be seen in any area where another color is not explicitly set. By default, the background is transparent; or, if |highlighthex= is set to any value, the background will default to a neutral off-white (#f8f9fa).
Any valid HTML color value can be set here. Hex values (e.g. #RRGGBB), color names (purple, slateblue, etc).
Pro tip: Set this to a light, non-white colour and combine with highlighthex to create interesting colour schemes. Highlighthex works by applying transparency to data cells, so the bodycolor will be mixed with it in those areas.
These parameters can be used instead of highlighthex to specify a color for the headers and labels (|headercolor=) and the data cells (|datacolor=). These parameters will cause |highlighthex= to be ignored in the applicable places, if it's set.
Any valid HTML color value can be set here. Hex values (e.g. #RRGGBB), color names (purple, slateblue, etc).
This parameter can be used instead of highlighthex to specify a color for the background of the image and caption areas. If this parameter is not set, the |datacolor= and |highlighthex= parameters will be used in that order.
Any valid HTML color value can be set here. Hex values (e.g. #RRGGBB), color names (purple, slateblue, etc).
Sets a color for the borders below each row of the infobox table. The default colour value used is #F4F6F6 or, if |highlighthex= is set, the border colour will be halfway between the label and data background colors (due to overlaid transparencies).
Any valid HTML color value can be set here. Hex values (e.g. #RRGGBB), color names (purple, slateblue, etc).
Know CSS? Want to place your own custom CSS into any of these fields? Go ahead! The contents of these parameters will be passed directly to {{Infobox}} after the default styles, meaning that the values you supply here will overwrite and replace what comes before them. This will allow you to create your own interesting, spectacular, creative and horrible styles for your Usergod infobox. With great power comes greatly uglified infoboxes.

Subsection style parameters

Don't love these new-fangled pictograms the kids these days use instead of words? No problem! Just set |emoji=no and they'll be disabled. (Default behaviour is the same as |emoji=yes.)
These parameters work as you expect to apply colours only to the Guild subsection of the infobox.
CSS to be applied to the whole Guild subsection.
CSS to be applied to header, label, and data calls of the Guild subsection.
These parameters work as you expect to apply colours only to the Pantheon subsection.
CSS to be applied to the whole Pantheon subsection.
CSS to be applied to the header, label, and data cells of the Pantheon subsection.
These parameters work as you expect to apply colours only to the Custom subsection.
CSS to be applied to the entire Custom subsection.
CSS to be applied to the header, image, label, and data cells of the Custom subsection.


If set to any value, the template will not apply [[Category:Gods]] to the page in which it appears. The default behaviour for the template is to correctly categorise the page.

Next steps

Long-term goals:

  • Rework Template:Hero as well, and then consider the feasibility of making the entire Hero template embeddable as a child subsection of this infobox. This possibility becomes part of redesign considerations for {{Hero}}).
  • And if we're going down that route, with {{Hero}} usable in a subsection of {{Usergod}}, why not break out a new {{Pet}} template that can become a subbox inside {{Hero}}? And, hell, while we're at it, why don't we have {{Ark}}, {{Lab-boss}}? With some planning and care, these can be made so they can be used stand-alone or be a sub-box within a superordinate template. (E.g., {{Ark|petname1=Nibbler|petclass1=Ballpoint Penguin|petlevel1=35|...}})