Template:Hastranscript/doc: Difference between revisions

no edit summary
(Replaced content with "{{Documentation}} Subtemplate of Template:Hastranscript that handles formatting the 'transcript is on another page' notice. Generally shouldn't be used directly, only through hastranscript. <includeonly>Category:Transclusion templates</includeonly>")
Tag: Replaced
No edit summary
 
Line 1:
{{Documentation}}
The {{t|Hastranscript}} template is used to indicate and link to/transclude a transcript page for any given article.
Subtemplate of [[Template:Hastranscript]] that handles formatting the 'transcript is on another page' notice. Generally shouldn't be used directly, only through hastranscript. <includeonly>[[Category:Transclusion templates]]</includeonly>
 
==Usage==
<pre>
{{hastranscript|type|link}}
 
{{hastranscript|transclude=yes}}
{{hastranscript|page|transclude=yes}}
{{hastranscript|page1|page2|...|transclude=yes}}
</pre>
 
==Parameters==
There are two forms of usage for hastranscript. The first generates a messagebox linking to the full transcript page (and that's it); this box is generated by [[Template:Hastranscript/t]]. The second will transclude the contents of the transcript page onto the current page; this should be used for shorter transcripts, generally.
 
===Link box===
*'''type''' - Optional (required if specifying link). Possible types are:
** <code>npc</code> - This option also adds a link to a list of other transcripts (currently available on the wiki) the NPC speaks in; the list is populated via [[Template:Transcript list]].
** <code>pet</code>
** <code>quest</code>
** <code>miniquest</code>
** <code>event</code>
** <code>item</code>
** <code>scenery</code>
*'''link''' - Optional. If the dialogue page is not found at <nowiki>Transcript:{{PAGENAME}}</nowiki> (which should only be the case in exceptional circumstances), used in place of the default link.
 
===Transclusion===
*'''transclude=yes''' - required to enable transclusion
*'''page''' - optional, the name of the page to transclude (without 'Transcript:'); will default to <nowiki>{{PAGENAME}}</nowiki> if not specified
**'''page1, page2, ..., pageN''' - multiple pages to transclude, if desired
 
==Examples==
===Link box===
<pre>{{hastranscript}}</pre> produces:
{{hastranscript}}
 
<pre>{{hastranscript|npc}}</pre> produces:
{{hastranscript|npc}}
 
===Transclusion===
<pre>{{hastranscript|Lift manual|transclude=yes}}</pre> produces:
{{hastranscript|Lift manual|transclude=yes}}
 
{{TemplateData|<templatedata>
{
"params": {
"1": {
"description": "The type of article the dialogue belongs to (one of: npc, pet, quest, miniquest, event, item). When the template is transcluding, this should be the Transcript page name instead.",
"example": "npc",
"type": "line"
},
"2": {
"description": "Link to the dialogue page if it is not Transcript:{{PAGENAME}} (this should only be needed in exceptional circumstances)",
"type": "line"
},
"transclude": {
"description": "Switch this template into transclusion mode. See documentation for details.",
"example": "yes",
"type": "boolean"
}
},
"description": "This template is used to indicate and link to a dialogue page for any given article.",
"format": "inline"
}
</templatedata>}}<includeonly>[[Category:Transclusion templates|{{PAGENAME}}]][[Category:Message box templates|{{PAGENAME}}]]</includeonly>