Template:EveryCRT gallery: Difference between revisions
Create universal gallery template for all content types (CRT models, AV devices, accessories, etc.) (via create-page on MediaWiki MCP Server) |
Change default mode to nolines, update docs with supported modes listed inline, remove aliases section (via update-page on MediaWiki MCP Server) |
||
| Line 8: | Line 8: | ||
=== Parameters === | === Parameters === | ||
All optional: | All optional: | ||
* '''mode''' — Gallery mode (default: <code>packed</code> | * '''mode''' — Gallery display mode (default: <code>nolines</code>). Supported values: | ||
* '''heights''' — Thumbnail height in px (default: <code>160</code>) | ** <code>nolines</code> — Clean grid with no borders or framing (default) | ||
** <code>packed</code> — Auto-adjusts image widths to fill each row evenly | |||
** <code>traditional</code> — Classic MediaWiki grid with borders and padding | |||
** <code>slideshow</code> — Displays one image at a time with navigation controls | |||
* '''heights''' — Thumbnail height in px (default: <code>160</code>). Use smaller values like <code>120</code> for pages with many images. | |||
* '''images''' — Override: explicitly provide a comma-separated list of image filenames instead of auto-detecting from the page source | * '''images''' — Override: explicitly provide a comma-separated list of image filenames instead of auto-detecting from the page source | ||
=== Usage === | === Usage === | ||
| Line 47: | Line 46: | ||
{{EveryCRT gallery|heights=120}} | {{EveryCRT gallery|heights=120}} | ||
</pre> | </pre> | ||
</noinclude><includeonly>{{#invoke:EveryCRTImages|autoGallery|images={{{images|}}}|mode={{{mode| | </noinclude><includeonly>{{#invoke:EveryCRTImages|autoGallery|images={{{images|}}}|mode={{{mode|nolines}}}|heights={{{heights|160}}}}}</includeonly> | ||
Latest revision as of 19:26, 10 February 2026
Universal gallery template for any EveryCRT content type (CRT models, AV devices, accessories, etc.). Use this when you want to position photos somewhere other than the default location — set suppress_gallery=yes in the content template, then place {{EveryCRT gallery}} wherever you want the photos to appear.
The template automatically reads the images= field from the page's own template invocation (e.g. {{CRT model}}, {{AV device}}, etc.) — no parameters are needed.
Uses Module:EveryCRTImages for rendering.
Parameters
All optional:
- mode — Gallery display mode (default:
nolines). Supported values:nolines— Clean grid with no borders or framing (default)packed— Auto-adjusts image widths to fill each row evenlytraditional— Classic MediaWiki grid with borders and paddingslideshow— Displays one image at a time with navigation controls
- heights — Thumbnail height in px (default:
160). Use smaller values like120for pages with many images. - images — Override: explicitly provide a comma-separated list of image filenames instead of auto-detecting from the page source
Usage
{{CRT model
|images=Photo1.jpg,Photo2.jpg
|suppress_gallery=yes
...
}}
== Some Section ==
Content here...
== Photos ==
{{EveryCRT gallery}}
Works identically with {{AV device}} or any other template that has an images= field:
{{AV device
|images=Photo1.jpg,Photo2.jpg
|suppress_gallery=yes
...
}}
== Variants ==
Content here...
== Photos ==
{{EveryCRT gallery|heights=120}}