Template:Knowledge: 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: | ||
{{!}}- | {{!}}- | ||
! Format | ! Format | ||
{{!}} {{{Knowledge Format}}} | {{!}} [[{{{Knowledge Format}}}]] | ||
}} | }} | ||
{{#if:{{{Author|}}}| | {{#if:{{{Author|}}}| | ||
| Line 60: | Line 60: | ||
{{!}}- | {{!}}- | ||
! Owner | ! Owner | ||
{{!}} [[User:{{{Owner}}}|{{{Owner}}}]] | {{!}} [[{{#ifeq:{{lc:{{#titleparts:{{{Owner}}}|1|1}}}}|user|{{{Owner}}}|User:{{{Owner}}}}}|{{#replace:{{{Owner}}}|User:|}}]] | ||
}} | }} | ||
{{#if:{{{Description|}}}| | {{#if:{{{Description|}}}| | ||
| Line 71: | Line 71: | ||
<!-- | <!-- | ||
================================================================== | ================================================================== | ||
== HIDDEN SEMANTIC DATA - | == HIDDEN SEMANTIC DATA - The single source of truth for your headless CMS. | ||
================================================================== | ================================================================== | ||
--> | --> | ||
| Line 77: | Line 77: | ||
[[Category:Knowledge]] | [[Category:Knowledge]] | ||
<!-- | <!-- Set controlled vocabulary properties. Default status is 'Draft'. --> | ||
[[Has status::{{{Status|Draft}}}]] | [[Has status::{{{Status|Draft}}}]] | ||
{{#if:{{{Knowledge Format|}}}|[[Has knowledge format::{{{Knowledge Format}}}]]}} | {{#if:{{{Knowledge Format|}}}|[[Has knowledge format::[[{{{Knowledge Format}}}]]]]}} | ||
{{#if:{{{Original Source|}}}|[[Has original source::{{{Original Source}}}]]}} | {{#if:{{{Original Source|}}}|[[Has original source::{{{Original Source}}}]]}} | ||
<!-- | <!-- 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 92: | Line 89: | ||
{{#if:{{{Author|}}}|[[Has author::{{{Author}}}]]}} | {{#if:{{{Author|}}}|[[Has author::{{{Author}}}]]}} | ||
{{#if:{{{Original Title|}}}|[[Has original title::{{{Original Title}}}]]}} | {{#if:{{{Original Title|}}}|[[Has original title::{{{Original Title}}}]]}} | ||
<!-- 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:Knowledge''' | '''Template:Knowledge''' | ||
Master template for Knowledge | Master template for Knowledge entries. Call via format wrappers only (e.g., {{Summary}}). Handles infobox and shared semantics for headless API pulls. | ||
</noinclude> | </noinclude> | ||
Revision as of 07:32, 21 September 2025
Template:Knowledge
Master template for Knowledge entries. Call via format wrappers only (e.g.,
| No image provided
| |
| Format | Summaries
|
|---|---|
). Handles infobox and shared semantics for headless API pulls.