Template:Knowledge: Difference between revisions
No edit summary |
No edit summary |
||
| Line 45: | Line 45: | ||
{{!}}- | {{!}}- | ||
! Topics | ! Topics | ||
{{!}} {{{Topic Tags}}} | {{!}} {{#arraymap:{{{Topic Tags|}}}|,|t| | ||
{{#ifeq:{{lc:{{#titleparts:{{#trim:t}}|1|1}}}}|tag | |||
| [[{{#trim:t}}|{{#replace:{{#trim:t}}|Tag:|}}]] | |||
| [[Tag:{{#trim:t}}|{{#trim:t}}]] | |||
}} | |||
|, }} | |||
}} | }} | ||
{{#if:{{{Status|}}}| | {{#if:{{{Status|}}}| | ||
| Line 119: | Line 124: | ||
[[Is featured::{{#ifeq:{{lc:{{{Is Featured|no}}}}}|yes|true|false}}]] | [[Is featured::{{#ifeq:{{lc:{{{Is Featured|no}}}}}|yes|true|false}}]] | ||
<!-- | <!-- Normalize Topic Tags to Tag: namespace and set multi-value Page property --> | ||
{{#if:{{{Topic Tags|}}} | {{#if:{{{Topic Tags|}}} | ||
| {{#arraymap:{{{Topic Tags|}}}|,| | | {{#arraymap:{{{Topic Tags|}}}|,|t| | ||
[[Has topic tag::{{#ifeq:{{lc:{{#titleparts:{{#trim:t}}|1|1}}}}|tag | |||
| {{#trim:t}} | |||
| Tag:{{#trim:t}} | |||
}}]] | |||
}} | |||
}} | }} | ||
</div> | </div> | ||
| Line 192: | Line 202: | ||
"Topic Tags": { | "Topic Tags": { | ||
"label": "Topic Tags", | "label": "Topic Tags", | ||
"description": "A comma-separated list of relevant Topic Tags. You | "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 | ||
Revision as of 17:54, 21 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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Image | Image | The filename of the image to display in the infobox (e.g., "My_Book_Cover.jpg"). | File | optional |
| Display Title | Display Title | The primary, user-facing title of the entry. | Line | optional |
| Subtitle | Subtitle | A short, descriptive tagline that appears below the main title. | Line | optional |
| Knowledge Format | Knowledge Format | The format of the entry. This is set automatically by the wrapper template and should not be changed.
| Page name | suggested |
| Author | Author | The original creator of the work (e.g., the book's author). | Line | optional |
| Original Title | Original Title | The official title of the original work being summarized. | Line | optional |
| Original Source | Original Source | The type of the original work.
| Line | optional |
| URL | URL | A relevant external link, such as to the original article or a purchase page. | URL | optional |
| Topic Tags | Topic Tags | A comma-separated list of relevant Topic Tags. You may enter either "Tag:Habits, Tag:Productivity" or "Habits, Productivity". | Line | required |
| Status | Status | The publication status of the entry. "Draft" keeps it hidden from public view.
| Line | required |
| Featured? | Is Featured | Set to 'yes' to highlight this content on hub pages. | Boolean | optional |
| Owner | Owner | The username of the person responsible for this content's accuracy (do not include the "User:" prefix). | User | required |
| Description | Description | The short, 1–2 sentence summary used on content cards across the site. | String | required |
| Main Content | Content | The main body of the article. This is a free-form text area that supports standard wikitext/VE. | Content | suggested |