Jump to content

Template:Knowledge: Difference between revisions

From WYOS Wiki
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 45: Line 45:
{{!}}-
{{!}}-
! Topics
! Topics
{{!}} {{{Topic Tags}}}
{{!}} {{#arraymap:{{{Topic Tags|}}}|,|x|[[x|{{#replace:x|Tag:|}}]]|, }}
}}
}}
{{#if:{{{Status|}}}|
{{#if:{{{Status|}}}|
Line 60: Line 60:
{{!}}-
{{!}}-
! Owner
! Owner
{{!}} [[{{#ifeq:{{lc:{{#titleparts:{{{Owner}}}|1|1}}}}|user|{{{Owner}}}|User:{{{Owner}}}}}|{{#replace:{{{Owner}}}|User:|}}]]
{{!}} [[User:{{{Owner}}}|{{{Owner}}}]]
}}
}}
{{#if:{{{Description|}}}|
{{#if:{{{Description|}}}|
Line 119: Line 119:
[[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. -->
<!-- Normalize Topic Tags to Tag: namespace and set multi-value Page property -->
{{#if:{{{Topic Tags|}}}
{{#if:{{{Topic Tags|}}}
  | {{#arraymap:{{{Topic Tags|}}}|,|x|[[Has topic tag::{{#trim:x}}]]}}
  | {{#arraymap:{{{Topic Tags|}}}|,|x|[[Has topic tag::x]]|\s}}
}}
}}
</div>
</div>
Line 192: Line 192:
     "Topic Tags": {
     "Topic Tags": {
       "label": "Topic Tags",
       "label": "Topic Tags",
       "description": "A comma-separated list of relevant Topic Tags. You must use the full page name (e.g., \"Tag:Habits, Tag:Productivity\").",
       "description": "A comma-separated list of relevant Topic Tags. You may enter either \"Tag:Habits, Tag:Productivity\" or \"Habits, Productivity\".",
       "type": "line",
       "type": "line",
       "required": true
       "required": true

Latest revision as of 23:24, 23 September 2025

Template:Knowledge Master template for Knowledge entries. Call via format wrappers only (e.g., {{Summary|…}}). Handles infobox and shared semantics for headless API pulls.

Master template for all Knowledge entries. Handles infobox and shared semantics. Should only be called by a format-specific wrapper template.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
ImageImage

The filename of the image to display in the infobox (e.g., "My_Book_Cover.jpg").

Fileoptional
Display TitleDisplay Title

The primary, user-facing title of the entry.

Lineoptional
SubtitleSubtitle

A short, descriptive tagline that appears below the main title.

Lineoptional
Knowledge FormatKnowledge Format

The format of the entry. This is set automatically by the wrapper template and should not be changed.

Suggested values
Summaries Guides Frameworks & Models Big Ideas Tips & Tactics Quick Insights Visuals
Example
Summaries
Page namesuggested
AuthorAuthor

The original creator of the work (e.g., the book's author).

Lineoptional
Original TitleOriginal Title

The official title of the original work being summarized.

Lineoptional
Original SourceOriginal Source

The type of the original work.

Example
Book
Lineoptional
URLURL

A relevant external link, such as to the original article or a purchase page.

URLoptional
Topic TagsTopic Tags

A comma-separated list of relevant Topic Tags. You may enter either "Tag:Habits, Tag:Productivity" or "Habits, Productivity".

Linerequired
StatusStatus

The publication status of the entry. "Draft" keeps it hidden from public view.

Suggested values
Draft Published Archived
Default
Draft
Linerequired
Featured?Is Featured

Set to 'yes' to highlight this content on hub pages.

Booleanoptional
OwnerOwner

The username of the person responsible for this content's accuracy (do not include the "User:" prefix).

Userrequired
DescriptionDescription

The short, 1–2 sentence summary used on content cards across the site.

Stringrequired
Main ContentContent

The main body of the article. This is a free-form text area that supports standard wikitext/VE.

Contentsuggested