Use variable for brand and correct parameter name for series (via update-page on MediaWiki MCP Server)
Rewrite to not use Variables extension - use userparam and query Series category directly (via update-page on MediaWiki MCP Server)
Line 1: Line 1:
<includeonly>{{#vardefine:seen_series|{{#var:seen_series}}}}{{#ifeq:{{#pos:{{#var:seen_series}}|[{{{Has series}}}]}}||{{#vardefine:seen_series|{{#var:seen_series}}[{{{Has series}}}]}}<tr>
<includeonly>{{#ifexpr:{{#ask:[[Category:CRT models]][[Has brand::{{{userparam}}}]][[Has series::{{{1}}}]]|format=count}} > 0|
<td>[[{{{Has series}}}]]</td>
{{!}}-
<td>{{#ask:[[Category:CRT models]][[Has brand::{{#var:current_brand}}]][[Has series::{{{Has series}}}]]|format=count}}</td>
{{!}} [[{{{1}}}]]
<td>{{#queryformlink:form=CRT query|query string=CRT query[brand]={{#var:current_brand}}&CRT query[series]={{{Has series}}}&_run|link text=Browse}}</td>
{{!}} {{#ask:[[Category:CRT models]][[Has brand::{{{userparam}}}]][[Has series::{{{1}}}]]|format=count}}
</tr>}}</includeonly><noinclude>
{{!}} {{#queryformlink:form=CRT query|query string=CRT query[brand]={{{userparam}}}&CRT query[series]={{{1}}}&_run|link text=Browse}}
}}</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.


This template deduplicates series values and outputs a table row for each unique series.
This template outputs a table row only if the series has CRTs for the specified brand.


== Parameters ==
== Parameters ==
* '''Has series''' - The series name (from ?Has series with named args)
* '''1''' - The series page name (from querying Category:Series)
 
* '''userparam''' - The brand name (passed from parent template)
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:50, 17 January 2026

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

This template outputs a table row only if the series has CRTs for the specified brand.

Parameters

  • 1 - The series page name (from querying Category:Series)
  • userparam - The brand name (passed from parent template)

Usage

Used internally by Template:CRTs by brand.

MediaWiki Appliance - Powered by TurnKey Linux