Template:Responsive Character Page: Difference between revisions
Alani Myrtel (talk | contribs) test |
Alani Myrtel (talk | contribs) Added known issue with wikitable pipes |
||
Line 50: | Line 50: | ||
}} | }} | ||
</pre> | </pre> | ||
It is recommended to place the <code><nowiki>__TOC__</nowiki></code> magic word <i>inside</i> the main-content field to force the Table of Contents of the page to render inside the template. Otherwise, it will most likely render above the template. Use the <code><nowiki>__NOTOC__</nowiki></code> magic word if you want to stop the Table of Contents to render altogether. | It is recommended to place the <code><nowiki>__TOC__</nowiki></code> magic word <i>inside</i> the main-content field to force the Table of Contents of the page to render inside the template. Otherwise, it will most likely render above the template. Use the <code><nowiki>__NOTOC__</nowiki></code> magic word if you want to stop the Table of Contents to render altogether. | ||
==Known Issues== | |||
===Wikitable Rendering=== | |||
It is known that wikitables do not go well with templates. Therefore, you need to escape the pipe <code>|</code> characters of wikitables with <code><nowiki>{{!}}</nowiki></code>. For more information, see [https://web.archive.org/web/20230730164505/https://www.mediawiki.org/wiki/Help:Templates#Tables_in_parameters the official MediaWiki documentation] (archived on July 30th 2023). | |||
A workaround would be to make a template of those tables, and using HTML table syntax instead of a wikitable. | |||
=Examples= | =Examples= | ||
Line 66: | Line 73: | ||
| main-content = | | main-content = | ||
This is the main content with extra filler. | This is the main content with extra filler. | ||
| character-infobox = {{Infobox Character-Alani Myrtel}} | | character-infobox = | ||
{{Infobox Character-Alani Myrtel | |||
| name = Alani Myrtel | |||
}} | |||
| filler-content = This is some optional filler content. | | filler-content = This is some optional filler content. | ||
}} | }} |
Revision as of 21:37, 11 August 2023
This article is in the process of an expansion or major restructuring, and is not yet complete. Do not make generic Holocron edits.
If this page has not been edited in several weeks, please remove this template.
Usage
{{Template:Responsive Character Page | backdrop-color = optional, defaults to 'none'. | background-color = optional, defaults to 'rgba(#000000, .2)'. | character-infobox-width = required, preferably in pixels (since character images are sized in pixels, account for table margins, paddings and/or borders!). Works best with infoboxes flexed to 100% width. | main-content = optional, defaults to an empty string. This is the content shown left of the character infobox (or below on mobile). | character-infobox = required | filler-content = optional, defaults to an empty string. This is a filler box mainly meant for desktop view. This is the content shown below the character infobox (both on mobile and on desktop). }}
It is recommended to place the __TOC__
magic word inside the main-content field to force the Table of Contents of the page to render inside the template. Otherwise, it will most likely render above the template. Use the __NOTOC__
magic word if you want to stop the Table of Contents to render altogether.
Known Issues
Wikitable Rendering
It is known that wikitables do not go well with templates. Therefore, you need to escape the pipe |
characters of wikitables with {{!}}
. For more information, see the official MediaWiki documentation (archived on July 30th 2023).
A workaround would be to make a template of those tables, and using HTML table syntax instead of a wikitable.
Examples
Try and view these examples both on mobile and desktop view via the F12 menu. See here (archived: March 24th 2023) to see how to.
No background color specified
{{{name}}} | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
No background color specified and with filler content
Alani Myrtel | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
This is some optional filler content.
Background color specified
background-color
parameter is set to rgba(50, 0, 0, .5)
.{{{name}}} | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
This is some optional filler content.
Backdrop color specified
backdrop-color
parameter is set to rgba(0, 0, 0, .2)
.{{{name}}} | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
This is some optional filler content.