Template:Knowledge: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{| class="wikitable" style="float:right; margin-left:1em; width:300px;" | <!-- | ||
| colspan="2" style="text-align:center;" | {{#if:{{{Image|}}}|[[File:{{{Image}}}|290px]]|''No image'' | ================================================================== | ||
== VISIBLE INFOBOX - This section only displays data. | |||
== It does not assign any semantic properties. | |||
================================================================== | |||
--> | |||
{| class="wikitable wyos-infobox" style="float:right; margin-left:1em; width:300px;" | |||
| colspan="2" style="text-align:center;" | {{#if:{{{Image|}}}|[[File:{{{Image}}}|290px]]|''No image provided''}} | |||
{{#if:{{{Display Title|}}}|{{!}}- | {{#if:{{{Display Title|}}}|{{!}}- | ||
! Display Title | ! Display Title | ||
| Line 11: | Line 14: | ||
{{#if:{{{Subtitle|}}}|{{!}}- | {{#if:{{{Subtitle|}}}|{{!}}- | ||
! Subtitle | ! Subtitle | ||
{{!}} {{{Subtitle|}}} | {{!}} {{{Subtitle}}} | ||
}} | |||
{{#if:{{{Knowledge Format|}}}|{{!}}- | |||
! Format | |||
{{!}} {{{Knowledge Format}}} | |||
}} | |||
{{#if:{{{Author|}}}|{{!}}- | |||
! Author | |||
{{!}} {{{Author}}} | |||
}} | }} | ||
{{#if:{{{Original Title|}}}|{{!}}- | {{#if:{{{Original Title|}}}|{{!}}- | ||
! Original Title | ! Original Title | ||
{{!}} "{{{Original Title}}}" | {{!}} "{{{Original Title}}}" | ||
}} | }} | ||
{{#if:{{{Original Source|}}}|{{!}}- | {{#if:{{{Original Source|}}}|{{!}}- | ||
| Line 25: | Line 32: | ||
{{!}} {{{Original Source}}} | {{!}} {{{Original Source}}} | ||
}} | }} | ||
{{#if:{{{URL|}}}|{{!}}- | {{#if:{{{URL|}}}|{{!}}- | ||
! URL | ! URL | ||
{{!}} [ | {{!}} [{{{URL}}} External Link] | ||
}} | |||
{{#if:{{{Topic Tags|}}}|{{!}}- | |||
! Topics | |||
{{!}} {{{Topic Tags}}} | |||
}} | }} | ||
|- | {{#if:{{{Status|}}}|{{!}}- | ||
! Status | ! Status | ||
{{!}} {{{Status}}} | |||
|- | }} | ||
! Featured | {{#if:{{{Is Featured|}}}|{{!}}- | ||
! Featured | |||
{{!}} {{{Is Featured}}} | |||
}} | |||
{{#if:{{{Description|}}}|{{!}}- | {{#if:{{{Description|}}}|{{!}}- | ||
! Description | ! Description | ||
| Line 47: | Line 54: | ||
|} | |} | ||
<!-- | |||
================================================================== | |||
== HIDDEN SEMANTIC DATA - This is the single source of truth for | |||
== assigning all semantic properties for the entry. | |||
================================================================== | |||
--> | |||
<div style="display:none;"> | <div style="display:none;"> | ||
[[Category:Knowledge]] | [[Category:Knowledge]] | ||
[[Has status::{{{Status| | [[Belongs to section::Knowledge]] | ||
[[Has knowledge format::{{{Knowledge Format|}}}]] | |||
[[Has display title::{{{Display Title|}}}]] | <!-- Set controlled vocabulary properties --> | ||
[[Has image::{{{Image | [[Has status::{{{Status|Published}}}]] | ||
[[Has description::{{{Description|}}}]] | {{#if:{{{Knowledge Format|}}}|[[Has knowledge format::{{{Knowledge Format}}}]]}} | ||
[[Has | {{#if:{{{Original Source|}}}|[[Has original source::{{{Original Source}}}]]}} | ||
[[Has original title::{{{Original Title | |||
[[ | <!-- Set standard properties only if a value is provided --> | ||
{{#if:{{{Display Title|}}}|[[Has display title::{{{Display Title}}}]]}} | |||
{{#if:{{{Subtitle|}}}|[[Has subtitle::{{{Subtitle}}}]]}} | |||
{{#if:{{{Image|}}}|[[Has image::{{{Image}}}]]}} | |||
{{#if:{{{Description|}}}|[[Has description::{{{Description}}}]]}} | |||
{{#if:{{{URL|}}}|[[Has url::{{{URL}}}]]}} | |||
{{#if:{{{Author|}}}|[[Has author::{{{Author}}}]]}} | |||
{{#if:{{{Original Title|}}}|[[Has original title::{{{Original Title}}}]]}} | |||
<!-- Set boolean property --> | |||
[[Is featured::{{#ifeq:{{lc:{{{Is Featured|no}}}}}|yes|yes|no}}]] | |||
<!-- Set multi-value 'Page' properties --> | |||
{{#arraymap:{{{Topic Tags|}}}|,|x|[[Has topic tag::x]]}} | {{#arraymap:{{{Topic Tags|}}}|,|x|[[Has topic tag::x]]}} | ||
</div> | </div> | ||
<!-- | |||
================================================================== | |||
== CONTENT SECTIONS - Populated by format-specific templates. | |||
== This is where the rich text content from VEForAll will appear. | |||
================================================================== | |||
--> | |||
{{{Content|}}} | |||
</includeonly><noinclude> | </includeonly><noinclude> | ||
This is the MASTER template for all Knowledge | '''Template:Knowledge''' | ||
This is the MASTER template for all Knowledge section entries. It should NOT be called directly. | |||
This template handles the infobox display and assigns all shared semantic properties. | |||
Use a format-specific wrapper template (e.g., Template:Summary), which will call this one and provide the necessary data. | |||
=== Parameters === | |||
* '''Image''': The filename of the main image (e.g., "My_Awesome_Image.jpg"). | |||
* '''Display Title''': The primary title shown to users. | |||
* '''Subtitle''': The secondary title or tagline. | |||
* '''Knowledge Format''': The format of the entry (e.g., [[Guide]]). Must be a link to the format's page. | |||
* '''Author''': The author of the original work, if applicable. | |||
* '''Original Title''': The title of the original work being summarized. | |||
* '''Original Source''': The source type (Book, Article, etc.), from a controlled list. | |||
* '''URL''': An external link related to the content. | |||
* '''Topic Tags''': A comma-separated list of links to topic pages (e.g., [[Habits]], [[Deep Work]]). This is critical for discovery. | |||
* '''Status''': The publication status (Published, Draft, Archived). Defaults to "Published". | |||
* '''Is Featured''': A "yes" or "no" flag to feature the content. Defaults to "no". | |||
* '''Description''': The short summary used on content cards. | |||
* '''Content''': This parameter is reserved for the main body of the article, passed in from a format-specific template. | |||
</noinclude> | </noinclude> | ||
Revision as of 05:18, 20 September 2025
Template:Knowledge
This is the MASTER template for all Knowledge section entries. It should NOT be called directly. This template handles the infobox display and assigns all shared semantic properties.
Use a format-specific wrapper template (e.g., Template:Summary), which will call this one and provide the necessary data.
Parameters
- Image: The filename of the main image (e.g., "My_Awesome_Image.jpg").
- Display Title: The primary title shown to users.
- Subtitle: The secondary title or tagline.
- Knowledge Format: The format of the entry (e.g., Guide). Must be a link to the format's page.
- Author: The author of the original work, if applicable.
- Original Title: The title of the original work being summarized.
- Original Source: The source type (Book, Article, etc.), from a controlled list.
- URL: An external link related to the content.
- Topic Tags: A comma-separated list of links to topic pages (e.g., Habits, Deep Work). This is critical for discovery.
- Status: The publication status (Published, Draft, Archived). Defaults to "Published".
- Is Featured: A "yes" or "no" flag to feature the content. Defaults to "no".
- Description: The short summary used on content cards.
- Content: This parameter is reserved for the main body of the article, passed in from a format-specific template.