×
Create a new article
Write your page title here:
We currently have 3,036 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



YumeWiki
3,036Articles

Template:ListThumb: Difference between revisions

(better formatting for images with inconsistent ratios + no longer use toccolours)
m (replace deprecated tag)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><div class="mw-collapsible">
<includeonly><div class="mw-collapsible">
<big>'''List with thumbnail images'''</big>
<b style="font-size:120%">List with thumbnail images</b>
----
----
<div class="mw-collapsible-content">
<div class="mw-collapsible-content">
<div style="display:flex; flex-direction:row; flex-wrap:wrap; padding:0px; align-items:center;">
<div style="display:flex; flex-direction:row; flex-wrap:wrap; padding:0px; align-items:center;">
{{#dpl:execandexit={{#ifeq:{{{page|{{PAGENAME}}}}}|Yume 2kki Locations|don't use on 2kki's page please|}}|category={{{page|{{PAGENAME}}}}}|uses=Template:Locationbox{{!}}Template:NPCBox{{!}}Template:Characterbox|count=200|include={Locationbox}:image,{NPCBox}:image,{Characterbox}:image|format=,\n<div style="flex-basis:{{#expr:{{{size|100}}}+200}}px; padding:2px 0;"> <div style="display:inline-block; min-width:{{{size|100}}}px; text-align:center;">[[File:,{{!}}{{{size|100}}}x{{{size|100}}}px{{!}}link=%PAGE%]]</div> <div style="display:inline-block; width:190px; vertical-align:middle;">[[%PAGE%{{!}}%TITLE%]]</div> </div>,|ordermethod=title|cacheperiod=604800}}
{{#dpl:execandexit={{#ifeq:{{{page|{{PAGENAME}}}}}|Yume 2kki Locations|don't use on 2kki's page please|}}|category={{{page|{{PAGENAME}}}}}|uses=Template:Locationbox{{!}}Template:NPCBox{{!}}Template:Characterbox|count=200|include={Locationbox}:image,{NPCBox}:image,{Characterbox}:image|format=,\n<div style="flex-basis:{{#expr:{{{size|100}}}+200}}px; padding:2px 0;"> <div style="display:inline-block; min-width:{{{size|100}}}px; text-align:center;">[[File:,{{!}}{{{size|100}}}x{{{size|100}}}px{{!}}link=%PAGE%]]</div> <div style="display:inline-block; width:190px; vertical-align:middle;">[[%PAGE%{{!}}%TITLE%]]</div> </div>,|ordermethod=title|cacheperiod=604800}}
</div>
</div></div></div></includeonly><noinclude>
----
</div></div></includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 23:59, 8 August 2024

Documentation (for the above template, sometimes hidden or invisible)

Description

This template has DPL code that shows a list of all locations/NPCs in a category of locations/characters with thumb images next to each article link.

Syntax

On a category of locations or characters:

{{ListThumb}}

On any other page:

{{ListThumb|page=Yume Nikki Locations}}

Usage

The function creates collapsible section with a default of two columns. Articles are listed in alphabetical order and a thumbnail from each is placed to the left of the article name. This creates a more visual list than the pure text of category pages. Its recommended to use this template directly on the location/character categories. This template does not work with any other category of articles as they do not use the Locationbox, NPCBox, or Characterbox templates.

When used on a category of articles that use any of Locationbox, NPCBox, or Characterbox, the function grabs the images from the articles to use them as thumbnails. You can choose which category to generate a list of by specifying the page parameter.

Keep in mind that the size parameter defaults to 100px and restricts both height and width.

Note: this template is prevented from working on Category:Yume 2kki Locations as loading 800+ images is not a good idea.

Parameters

Template parameters

ParameterDescriptionTypeStatus
Category Pagepage

Select the category of which to generate a list of articles with thumbnails.

Example
Wataru
Auto value
{{PAGENAME}}
Lineoptional
Thumbnail Sizesize

Limit both the width and height of each thumbnail image to a size in pixels.

Default
100
Numberoptional

Sample

The following input:

{{ListThumb|page=HAL|size=300}}

Produces:


Visit Template:ListThumb/doc to edit this text! (How does this work?)