Template:RelatedReports: Difference between revisions
From Avi's Drug Diary
Created page with "<includeonly> ---- == Related Reports == {{{reports|No related reports yet.}}} </includeonly> <noinclude> Parameters: * reports= </noinclude>" |
Polish RelatedReports display |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
---- | ---- | ||
<h2>Related Reports</h2> | |||
== | {{#if:{{{reports|}}}|{{{reports}}}|{{#if:{{{substance1|}}}|<ul> | ||
{{#cargo_query: | |||
{{{reports|No related reports yet.}}} | tables=Reports | ||
|fields=_pageName=page,Title=title,ReportType=type,PrimarySubstances=substances | |||
|where=_pageName<>'{{FULLPAGENAME}}' AND (PrimarySubstances HOLDS '{{{substance1}}}'{{#if:{{{substance2|}}}| OR PrimarySubstances HOLDS '{{{substance2}}}'}}{{#if:{{{substance3|}}}| OR PrimarySubstances HOLDS '{{{substance3}}}'}}{{#if:{{{substance4|}}}| OR PrimarySubstances HOLDS '{{{substance4}}}'}}{{#if:{{{substance5|}}}| OR PrimarySubstances HOLDS '{{{substance5}}}'}}) | |||
|order by=_pageID DESC | |||
|limit={{{limit|15}}} | |||
|format=template | |||
|template=RelatedReportRow | |||
|named args=yes | |||
|delimiter= | |||
|more results text= | |||
|default=<li><em>No related reports yet.</em></li> | |||
}} | |||
</ul>|<em>No related reports yet.</em>}}}} | |||
</includeonly> | </includeonly> | ||
<noinclude> | |||
Automatically lists other reports that share primary substances. | |||
Parameters: | Parameters: | ||
* <code>substance1</code>…<code>substance5</code> — substance names to match (at least substance1) | |||
* <code>limit</code> — max results (default 15) | |||
* <code>reports</code> — optional manual override (wikitext); when set, Cargo query is skipped | |||
Example: | |||
<pre> | |||
{{RelatedReports | |||
|substance1=NEP | |||
|substance2=Ketamine | |||
}} | |||
</pre> | |||
</noinclude> | </noinclude> | ||
Latest revision as of 18:24, 9 August 2026
Automatically lists other reports that share primary substances.
Parameters:
substance1…substance5— substance names to match (at least substance1)limit— max results (default 15)reports— optional manual override (wikitext); when set, Cargo query is skipped
Example:
{{RelatedReports
|substance1=NEP
|substance2=Ketamine
}}