Helper template for brand-specific series table rows (via create-page on MediaWiki MCP Server)
 
Use variable for brand and correct parameter name for series (via update-page on MediaWiki MCP Server)
Line 1: Line 1:
<includeonly>{{#vardefine:seen_series|{{#var:seen_series}}}}{{#ifeq:{{#pos:{{#var:seen_series}}|[{{{2}}}]}}|}|{{#vardefine:seen_series|{{#var:seen_series}}[{{{2}}}]|}}<tr>
<includeonly>{{#vardefine:seen_series|{{#var:seen_series}}}}{{#ifeq:{{#pos:{{#var:seen_series}}|[{{{Has series}}}]}}||{{#vardefine:seen_series|{{#var:seen_series}}[{{{Has series}}}]}}<tr>
<td>[[{{{2}}}]]</td>
<td>[[{{{Has series}}}]]</td>
<td>{{#ask:[[Category:CRT models]][[Has brand::{{{brand}}}]][[Has series::{{{2}}}]]|format=count}}</td>
<td>{{#ask:[[Category:CRT models]][[Has brand::{{#var:current_brand}}]][[Has series::{{{Has series}}}]]|format=count}}</td>
<td>{{#queryformlink:form=CRT query|query string=CRT query[brand]={{{brand}}}&CRT query[series]={{{2}}}&_run|link text=Browse}}</td>
<td>{{#queryformlink:form=CRT query|query string=CRT query[brand]={{#var:current_brand}}&CRT query[series]={{{Has series}}}&_run|link text=Browse}}</td>
</tr>}}</includeonly><noinclude>
</tr>}}</includeonly><noinclude>
Helper template for [[Template:CRTs by brand]] to display series rows filtered by brand.
Helper template for [[Template:CRTs by brand]] to display series rows filtered by brand.
Line 9: Line 9:


== Parameters ==
== Parameters ==
* '''1''' - The CRT model page name (not used, but passed by #ask)
* '''Has series''' - The series name (from ?Has series with named args)
* '''2''' - The series name (from ?Has series)
 
* '''brand''' - The brand to filter by (passed as named parameter)
The brand is accessed via <code><nowiki>{{#var:current_brand}}</nowiki></code> which is set by the parent template.


== Usage ==
== Usage ==

Revision as of 14:45, 17 January 2026

Helper template for Template:CRTs by brand to display series rows filtered by brand.

This template deduplicates series values and outputs a table row for each unique series.

Parameters

  • Has series - The series name (from ?Has series with named args)

The brand is accessed via {{#var:current_brand}} which is set by the parent template.

Usage

Used internally by Template:CRTs by brand.

MediaWiki Appliance - Powered by TurnKey Linux