Template:FRWiki: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
(Updated documentation and added category)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{{2|}}}| long = * {{SmallIcon|FRWiki Icon.png}} [https://forgottenrealms.fandom.com/wiki/{{#replace:{{{1}}}| |%5F}} {{{3|{{{1}}}}}}] on the [https://forgottenrealms.fandom.com/wiki/Main_Page Forgotten Realms Wiki]|{{SmallIcon|FRWiki Icon.png}} [https://forgottenrealms.fandom.com/wiki/{{#replace:{{{1}}}| |%5F}} {{{2|{{{1}}}}}}]}}</includeonly><noinclude>[[Category:Templates]]
<includeonly>{{#switch: {{{2|}}}| long = {{SmallIcon|FRWiki Icon.png}} [https://forgottenrealms.fandom.com/wiki/{{#replace:{{{1}}}| |%5F}} {{{3|{{{1}}}}}}] on the [https://forgottenrealms.fandom.com/wiki/Main_Page Forgotten Realms Wiki]|{{SmallIcon|FRWiki Icon.png}} [https://forgottenrealms.fandom.com/wiki/{{#replace:{{{1}}}| |%5F}} {{{2|{{{1}}}}}}]}}</includeonly><noinclude>{{documentation|content=
Test: {{FRWiki|Mind Flayer}} or {{FRWiki|Mind Flayer|Description}}
Display an external link to a page on the Forgotten Realms wiki.


{{InfoBlob|<nowiki>Test: {{FRWiki|Mind Flayer}} or  {{FRWiki|Mind Flayer|Description}}</nowiki>}}
There are two available formats: the default compact version suitable for inline use and a longer form suitable for lists in "External links" sections of articles.
== Examples ==
{{Template demo
| style = table
| <nowiki>{{FRWiki|Mind Flayer}}</nowiki>
| <nowiki>{{FRWiki|Mind Flayer|Mind Flayers}}</nowiki>
| <nowiki>{{FRWiki|Minsc|long}}</nowiki>
| <nowiki>{{FRWiki|Minsc|long|Minsc and Boo}}</nowiki>
}}


Or try the long version:
== Template data ==
{{FRWiki|Minsc|long}}
<templatedata>
 
{
{{InfoBlob|<nowiki>{{FRWiki|Minsc|long}}</nowiki>}}
    "description": "Link to an external page on the Forgotten Realms wiki.",
{{FRWiki|Jaheira|long|Yes oh omnipresent authority figure}}
    "format": "inline",
 
"params": {
{{InfoBlob|<nowiki>{{FRWiki|Jaheira|long|Yes oh omnipresent authority figure}}</nowiki>}}
"1": {
"label": "Page name",
            "description": "The FRWiki page to link to.",
"type": "wiki-page-name",
"required": true
},
"2": {
"label": "alias OR long",
"description": "This parameter is either used to specify the long format or to provide alternative text for the link.",
            "suggestedvalues": ["long"],
"type": "string"
},
        "3": {
            "label": "alias",
"description": "If the second parameter was \"long\", this parameter is instead used for the alias.",
"type": "string"
}
}
}
</templatedata>}}
[[Category:Templates]]
[[Category:Link templates]]
[[Category:External link templates]]
</noinclude>

Latest revision as of 20:39, 21 July 2024

Template documentation

Display an external link to a page on the Forgotten Realms wiki.

There are two available formats: the default compact version suitable for inline use and a longer form suitable for lists in "External links" sections of articles.

Examples

Markup Renders as
{{FRWiki|Mind Flayer}}
Mind Flayer
{{FRWiki|Mind Flayer|Mind Flayers}}
Mind Flayers
{{FRWiki|Minsc|long}}
Minsc on the Forgotten Realms Wiki
{{FRWiki|Minsc|long|Minsc and Boo}}
Minsc and Boo on the Forgotten Realms Wiki

Template data

Link to an external page on the Forgotten Realms wiki.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page name1

The FRWiki page to link to.

Page namerequired
alias OR long2

This parameter is either used to specify the long format or to provide alternative text for the link.

Suggested values
long
Stringoptional
alias3

If the second parameter was "long", this parameter is instead used for the alias.

Stringoptional