Jump to content

Template:Main Page/Highlight: Difference between revisions

From The Petit Planet Wiki
Added ext parameter
m Changed template data format
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:


==Syntax==
==Syntax==
<pre>
<syntaxhighlight lang="wikitext" copy>
{{Main Page/Highlight
{{Main Page/Highlight
|image =  
|image =  
Line 20: Line 20:
|tag_text =  
|tag_text =  
}}
}}
</pre>
</syntaxhighlight>
* {{F|image}} &ndash; Destination filename ('''excluding''' the file extension).
* {{F|image}} &ndash; Destination filename ('''excluding''' the file extension).
* {{F|ext}} &ndash; Extension for filename. Default: {{F|png}}.
* {{F|ext}} &ndash; Extension for filename. Default: {{F|png}}.
Line 29: Line 29:


==Example==
==Example==
<pre>
{{Example|<nowiki>
{{Main Page/Highlight
|image = Stardrift Test Splashscreen
|title = Stardrift Test
|link  = Version/Stardrift Test
|tag_text = Beta
}}
{{Main Page/Highlight
|image = Coziness Test Splashscreen
|title = Coziness Test
|link  = Version/Coziness Test
|tag_text = Beta
}}
</pre>
<templatestyles src="Template:Main Page/styles.css" />
<div class="mp-highlight-wrapper">
<div class="mp-highlight-wrapper">
{{Main Page/Highlight
{{Main Page/Highlight
Line 58: Line 44:
}}
}}
</div>
</div>
</nowiki>}}


==Template Data==
==Template Data==
Line 102: Line 89:
"description": "Link of the highlight card.",
"description": "Link of the highlight card.",
"example": "Version/Coziness Test",
"example": "Version/Coziness Test",
"type": "string",
"type": "wiki-page-name",
"required": true
"required": true
}
}
Line 115: Line 102:
"tag_text"
"tag_text"
],
],
"format": "block"
"format": "{{_\n|_______________ = _\n}}\n"
}
}
</templatedata>
</templatedata>
 
<templatestyles src="Template:Main Page/styles.css" />
}}</noinclude>
}}</noinclude>

Latest revision as of 12:32, 18 May 2026

Template documentation
Note: parts of or the entire template might not be visible without values provided.
This template uses CSS found at Template:Main Page/styles.css.

Template that creates highlight cards for {{Main Page}}.

Syntax

{{Main Page/Highlight
|image = 
|title = 
|link  = 
|tag   = 
|tag_text = 
}}
  • image – Destination filename (excluding the file extension).
  • ext – Extension for filename. Default: png.
  • title – Title of the highlight card.
  • link – Link of the highlight card.
  • tag – Type of tag that will be displayed on the highlight card. Default: Update.
  • tag_text – Text displayed in the tag on the highlight card. Default: tag.

Example

<div class="mp-highlight-wrapper">
{{Main Page/Highlight
|image = Stardrift Test Splashscreen
|title = Stardrift Test
|link  = Version/Stardrift Test
|tag_text = Beta
}}
{{Main Page/Highlight
|image = Coziness Test Splashscreen
|title = Coziness Test
|link  = Version/Coziness Test
|tag_text = Beta
}}
</div>

Stardrift Test

Beta
Version/Stardrift Test

Coziness Test

Beta
Version/Coziness Test

Template Data

Template that creates highlight cards for the Main Page.

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
Imageimage

Destination filename (excluding the extension).

Example
Coziness Test Splashscreen
Filerequired
Extensionext

Extension for filename.

Default
png
Stringoptional
Titletitle

Title of the highlight card.

Example
Coziness Test
Stringrequired
Linklink

Link of the highlight card.

Example
Version/Coziness Test
Page namerequired
Tagtag

Type of tag that will be displayed on the highlight card.

Default
Update
Example
Featured
Stringsuggested
Tag texttag_text

Text displayed in the tag on the highlight card.

Default
<tag>
Example
Beta
Stringoptional