Template:Infobox place/link: Difference between revisions
Robertbaxter (talk | contribs) (Created page with "<noinclude></noinclude><includeonly><tr><th scope="row">{{{link_label|}}}</th><td>{{Clean URL|{{{link_url|}}}}}</td></tr></includeonly>") |
Robertbaxter (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<noinclude></noinclude><includeonly><tr><th scope="row">{{{ | <noinclude> | ||
<noinclude> | |||
This is a helper template for [[Template:Infobox place]], it takes information about a link and displays it as a row in the infobox. | |||
== Behavior == | |||
''The examples below are embedded in an empty infobox for accurate table row display.'' | |||
Both a URL and a label must be provided—the label serves as the row header, while the URL is simplified with [[Template:clean URL]] and is displayed as the row data. | |||
<pre>{{Infobox place/link|https://www.iprc.org/events|Calendar}}</pre> | |||
{| class="infobox" | |||
{{Infobox place/link|https://www.iprc.org/events|Calendar}} | |||
|} | |||
== Template Data == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"link_url": { | |||
"label": "URL", | |||
"description": "The URL for the link.", | |||
"type": "url", | |||
"required": true | |||
}, | |||
"link_label": { | |||
"label": "Label", | |||
"description": "A custom label for the link.", | |||
"type": "string", | |||
"required": true | |||
} | |||
}, | |||
"description": "A helper template to display custom links in the infobox for a place.", | |||
"format": "inline" | |||
} | |||
</templatedata> | |||
</noinclude><includeonly><tr><th scope="row">{{{2}}}</th><td>{{Clean URL|{{{1}}}}}</td></tr></includeonly> |
Revision as of 19:54, 17 December 2024
This is a helper template for Template:Infobox place, it takes information about a link and displays it as a row in the infobox.
Behavior
The examples below are embedded in an empty infobox for accurate table row display.
Both a URL and a label must be provided—the label serves as the row header, while the URL is simplified with Template:clean URL and is displayed as the row data.
{{Infobox place/link|https://www.iprc.org/events|Calendar}}
Calendar | iprc.org/events |
---|---|
Template Data
A helper template to display custom links in the infobox for a place.
Parameter | Description | Type | Status | |
---|---|---|---|---|
URL | link_url | The URL for the link. | URL | required |
Label | link_label | A custom label for the link. | String | required |