Jump to content

Template:OpenLinkInNewTab: Difference between revisions

From Swarthmore Knowledge Base
Created page with "<includeonly>{{#widget:OpenLinkInNewTab|url={{{url}}}|link_text={{{Link Text|url}}}}}</includeonly> <noinclude>== Usage == <nowiki>{{OpenLinkInNewTab|https://example.com|Link to example.com}}</nowiki> <templatedata> { "params": { "url": { "description": "Link url (including https://)", "type": "url", "required": true }, "Link Text": { "description": "Text to use for the link. Will use url if left blank", "type": "number" } }, "paramOrder": [..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#widget:OpenLinkInNewTab|url={{{url}}}|link_text={{{Link Text|url}}}}}</includeonly>
<includeonly>{{#widget:OpenLinkInNewTab|url={{{1}}}|link_text={{{2|{{{1}}}}}}}}</includeonly>
<noinclude>== Usage ==
<noinclude>== Usage ==
  <nowiki>{{OpenLinkInNewTab|https://example.com|Link to example.com}}</nowiki>
  <nowiki>{{OpenLinkInNewTab|https://example.com|Link to example.com}}</nowiki>


Line 7: Line 6:
{
{
"params": {
"params": {
"url": {
"1": {
"label": "URL",
"description": "Link url (including https://)",
"description": "Link url (including https://)",
"type": "url",
"type": "url",
"required": true
"required": true
},
},
"Link Text": {
"2": {
"label": "Link Text",
"description": "Text to use for the link. Will use url if left blank",
"description": "Text to use for the link. Will use url if left blank",
"type": "number"
"type": "line",
"suggested": true
}
}
},
},
"paramOrder": [
"paramOrder": [
"url",
"1",
"Link Text"
"2"
],
],
"description": "Create a link that opens in a new tab"
"description": "Create a link that opens in a new tab"

Latest revision as of 18:56, 16 July 2026

Usage

{{OpenLinkInNewTab|https://example.com|Link to example.com}}

Create a link that opens in a new tab

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
URL1

Link url (including https://)

URLrequired
Link Text2

Text to use for the link. Will use url if left blank

Linesuggested