Template:RelatedReports: Difference between revisions
From Avi's Drug Diary
Implement Cargo-backed related reports |
Polish RelatedReports display |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
---- | ---- | ||
<h2>Related Reports</h2> | |||
{{#if:{{{reports|}}} | {{#if:{{{reports|}}}|{{{reports}}}|{{#if:{{{substance1|}}}|<ul> | ||
|{{{reports}}} | |||
|{{#if:{{{substance1|}}} | |||
|<ul> | |||
{{#cargo_query: | {{#cargo_query: | ||
tables=Reports | tables=Reports | ||
| Line 19: | Line 16: | ||
|default=<li><em>No related reports yet.</em></li> | |default=<li><em>No related reports yet.</em></li> | ||
}} | }} | ||
</ul> | </ul>|<em>No related reports yet.</em>}}}} | ||
|<em>No related reports yet.</em> | |||
}} | |||
}} | |||
</includeonly> | </includeonly> | ||
<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
}}