Jump to content

Template:MediaForAgent: Difference between revisions

From ICE List Wiki
[unchecked revision][unchecked revision]
Self-hiding: only show Media section when items are tagged
PF-free self-hiding (Cargo intro/default, no #if)
ย 
Line 1: Line 1:
<includeonly>{{#if:{{#cargo_query:tables=Media|fields=_pageName|where=agents HOLDS '{{FULLPAGENAME}}'|format=list|limit=1|default=}}|
<includeonly>{{#cargo_query:tables=Media|fields=platform,url,embed,caption,mdate,state,agents,incidents,status,_pageName|where=agents HOLDS '{{FULLPAGENAME}}'|format=template|template=Media/card|order by=mdate desc|limit=100|intro=<div class="ic-media-block"><div class="mw-heading mw-heading2"><h2>Media</h2></div><div class="ic-video-gallery">|outro=</div></div>|default=}}</includeonly><noinclude>Auto-embeds Media tagged to this agent (Cargo intro/default self-hides when none). Place on a agent page: <code><nowiki>{{MediaForAgent}}</nowiki></code>. [[Category:Templates]]</noinclude>
== Media ==
{{#cargo_query:tables=Media|fields=platform,url,embed,caption,mdate,state,agents,incidents,status,_pageName|where=agents HOLDS '{{FULLPAGENAME}}'|format=template|template=Media/card|order by=mdate desc|limit=100|intro=<div class="ic-video-gallery">|outro=</div>|default=}}
|}}</includeonly><noinclude>Auto-embeds Media items tagged to this agent (Cargo). Renders nothing until media is tagged. Place near the bottom of a agent page: <code><nowiki>{{MediaForAgent}}</nowiki></code>. [[Category:Templates]]</noinclude>

Latest revision as of 18:39, 10 July 2026

Auto-embeds Media tagged to this agent (Cargo intro/default self-hides when none). Place on a agent page: {{MediaForAgent}}.