Template:Resource: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
<!-- | <!-- | ||
================================================================== | ================================================================== | ||
== VISIBLE INFOBOX - | == VISIBLE INFOBOX - For display on the wiki page only. | ||
================================================================== | ================================================================== | ||
--> | --> | ||
| Line 20: | Line 20: | ||
{{!}}- | {{!}}- | ||
! Type | ! Type | ||
{{!}} {{{Resource Type}}} | {{!}} [[{{{Resource Type}}}]] | ||
}} | }} | ||
{{#if:{{{Author|}}}| | {{#if:{{{Author|}}}| | ||
| Line 50: | Line 50: | ||
{{!}}- | {{!}}- | ||
! Owner | ! Owner | ||
{{!}} [[User:{{{Owner}}}|{{{Owner}}}]] | {{!}} [[{{#ifeq:{{lc:{{#titleparts:{{{Owner}}}|1|1}}}}|user|{{{Owner}}}|User:{{{Owner}}}}}|{{#replace:{{{Owner}}}|User:|}}]] | ||
}} | }} | ||
{{#if:{{{Description|}}}| | {{#if:{{{Description|}}}| | ||
| Line 61: | Line 61: | ||
<!-- | <!-- | ||
================================================================== | ================================================================== | ||
== HIDDEN SEMANTIC DATA - | == HIDDEN SEMANTIC DATA - The single source of truth for your headless CMS. | ||
================================================================== | ================================================================== | ||
--> | --> | ||
| Line 67: | Line 67: | ||
[[Category:Resources]] | [[Category:Resources]] | ||
<!-- | <!-- Set controlled vocabulary properties. Default status is 'Draft'. --> | ||
[[Has status::{{{Status|Draft}}}]] | [[Has status::{{{Status|Draft}}}]] | ||
{{#if:{{{Resource Type|}}}|[[Has resource type::{{{Resource Type}}}]]}} | {{#if:{{{Resource Type|}}}|[[Has resource type::{{{Resource Type}}}]]}} | ||
<!-- | <!-- Set standard properties only if a value is provided. --> | ||
{{#if:{{{Display Title|}}}|[[Has display title::{{{Display Title}}}]]}} | {{#if:{{{Display Title|}}}|[[Has display title::{{{Display Title}}}]]}} | ||
{{#if:{{{Subtitle|}}}|[[Has subtitle::{{{Subtitle}}}]]}} | {{#if:{{{Subtitle|}}}|[[Has subtitle::{{{Subtitle}}}]]}} | ||
| Line 80: | Line 77: | ||
{{#if:{{{URL|}}}|[[Has url::{{{URL}}}]]}} | {{#if:{{{URL|}}}|[[Has url::{{{URL}}}]]}} | ||
{{#if:{{{Author|}}}|[[Has author::{{{Author}}}]]}} | {{#if:{{{Author|}}}|[[Has author::{{{Author}}}]]}} | ||
<!-- Robust | <!-- Robust Owner Handling: Adds 'User:' prefix only if it's missing. --> | ||
{{#if:{{{ | {{#if:{{{Owner|}}}|[[Has owner::{{#ifeq:{{lc:{{#titleparts:{{{Owner}}}|1|1}}}}|user|{{{Owner}}}|User:{{{Owner}}}}}}]]}} | ||
<!-- | <!-- Robust image handling: adds 'File:' prefix only if user forgets it. --> | ||
{{#if:{{{Image|}}}|[[Has image::{{#ifeq:{{lc:{{#titleparts:{{{Image}}}|1|1}}}}|file|{{{Image}}}|File:{{{Image}}}}}}]]}} | |||
<!-- Set boolean property to return true/false for the API. --> | |||
[[Is featured::{{#ifeq:{{lc:{{{Is Featured|no}}}}}|yes|true|false}}]] | [[Is featured::{{#ifeq:{{lc:{{{Is Featured|no}}}}}|yes|true|false}}]] | ||
<!-- | <!-- Set multi-value 'Page' property. #trim prevents errors from extra spaces. --> | ||
{{#if:{{{Topic Tags|}}}|{{#arraymap:{{{Topic Tags|}}}|,|x|[[Has topic tag::{{#trim:x}}]]}}} | {{#if:{{{Topic Tags|}}}|{{#arraymap:{{{Topic Tags|}}}|,|x|[[Has topic tag::{{#trim:x}}]]}}}} | ||
</div> | </div> | ||
<!-- | <!-- | ||
================================================================== | ================================================================== | ||
== CONTENT - | == CONTENT - This displays the main body of the article. | ||
================================================================== | ================================================================== | ||
--> | --> | ||
{{{Content|}}} | {{{Content|}}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
'''Template:Resource''' | '''Template:Resource''' | ||
Master template for Resource | Master template for Resource entries. Call via type wrappers only (e.g., {{Book}}). Handles infobox and shared semantics for headless API pulls. | ||
</noinclude> | </noinclude> | ||
Revision as of 08:01, 21 September 2025
Template:Resource
Master template for Resource entries. Call via type wrappers only (e.g.,
| No image provided
| |
| Type | Book
|
|---|---|
). Handles infobox and shared semantics for headless API pulls.