Jump to content

Template:Book: Difference between revisions

From WYOS Wiki
No edit summary
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<onlyinclude>
{| class="wikitable" style="float:right; margin-left:1em; width:300px;"
[[Category:Resources]]
| colspan="2" style="text-align:center;" | [[File:{{{Image|}}}|290px]]
[[Category:Books]]
|-
{{Resource
! Author
|Resource Type=Book
| [[Has author::{{{Author|}}}]]
|Status={{{Status|}}}
|-
|Display Title={{{Display Title|}}}
! Tags
|Subtitle={{{Subtitle|}}}
| {{{Topic Tags|}}}
|Author={{{Author|}}}
|-
|Image={{{Image|}}}
! URL
|Description={{{Description|}}}
| [[Has url::{{{URL|}}}]]
|Topic Tags={{{Topic Tags|}}}
|-
|Is Featured={{{Is Featured|}}}
! Featured?
|Owner={{{Owner|}}}
| [[Is featured::{{{Is Featured|}}}]]
|URL={{{URL|}}}
|}
|Content={{{Content|}}}
<div style="display:none;">
<!-- Invisible Data Section -->
[[Has resource type::Book]]
[[Has image::{{{Image|}}}]]
[[Has description::{{{Description|}}}]]
{{#arraymap:{{{Topic Tags|}}}|,|x|[[Has topic tag::x]]}}
</div>
</includeonly><noinclude>
== How to use this Template ==
This template is for adding a new book to the WYOS database.
 
=== Syntax ===
<pre>
{{Book
|Image=
|Author=
|Topic Tags=
|URL=
|Description=
|Is Featured= <!-- "Yes" or "No" -->
}}
}}
</pre>
</onlyinclude><noinclude>
Wrapper for Books. Call at page top; add main content below.
<templatedata>
{
  "description": "Wrapper for Book resources. Passes fields to Template:Resource. No predefined content sections—use the main Content area.",
  "params": {
    "Status": {"label":"Status","description":"Draft, Published, or Archived.","type":"line","suggestedvalues":["Draft","Published","Archived"],"required":true},
    "Display Title": {"label":"Display Title","description":"User-facing title override.","type":"line"},
    "Subtitle": {"label":"Subtitle","description":"Optional book subtitle.","type":"line"},
    "Author": {"label":"Author","description":"Book author(s).","type":"line"},
    "Image": {"label":"Image","description":"Cover filename (e.g., \"Atomic_Habits.jpg\").","type":"wiki-file-name"},
    "Description": {"label":"Description","description":"1–2 sentence card/list summary.","type":"string","required":true},
    "Topic Tags": {"label":"Topic Tags","description":"Comma-separated tags. Use either \"Tag:Stoicism\" or \"Stoicism\" style.","type":"line","required":true},
    "Is Featured": {"label":"Featured?","description":"Set to 'yes' to highlight.","type":"boolean"},
    "Owner": {"label":"Owner","description":"Responsible username (no \"User:\" prefix).","type":"wiki-user-name","required":true},
    "URL": {"label":"URL","description":"Primary external link (publisher, store, etc.).","type":"url"},
    "Content": {"label":"Main Content","description":"Free-form body; wikitext/VE supported.","type":"content","suggested":true}
  },
  "format":"block"
}
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 16:09, 22 September 2025


No image provided


Type Book





Book




false


Wrapper for Books. Call at page top; add main content below.

Wrapper for Book resources. Passes fields to Template:Resource. No predefined content sections—use the main Content area.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
StatusStatus

Draft, Published, or Archived.

Suggested values
Draft Published Archived
Linerequired
Display TitleDisplay Title

User-facing title override.

Lineoptional
SubtitleSubtitle

Optional book subtitle.

Lineoptional
AuthorAuthor

Book author(s).

Lineoptional
ImageImage

Cover filename (e.g., "Atomic_Habits.jpg").

Fileoptional
DescriptionDescription

1–2 sentence card/list summary.

Stringrequired
Topic TagsTopic Tags

Comma-separated tags. Use either "Tag:Stoicism" or "Stoicism" style.

Linerequired
Featured?Is Featured

Set to 'yes' to highlight.

Booleanoptional
OwnerOwner

Responsible username (no "User:" prefix).

Userrequired
URLURL

Primary external link (publisher, store, etc.).

URLoptional
Main ContentContent

Free-form body; wikitext/VE supported.

Contentsuggested