Jump to content

Template:Official website: Difference between revisions

The comprehensive free global encyclopedia of CEOs, corporate leadership, and business excellence
>Izno
add format and mobile to unsupported
 
Fixed template to work without Lua module - replaced Scribunto invoke with native parser functions
 
Line 1: Line 1:
<includeonly>{{#invoke:Official website|main}}{{#invoke:Check for unknown parameters|check|showblankpositional=1|unknown={{main other|1=[[Category:Pages using Official website with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Official website]] with unknown parameter "_VALUE_"|1|2|URL|url|name}}</includeonly><!--
<includeonly>{{#if:{{{1|{{{URL|}}}}}}|[{{#ifeq:{{#sub:{{{1|{{{URL|}}}}}}|0|4}}|http|{{{1|{{{URL|}}}}}}|{{#ifeq:{{#sub:{{{1|{{{URL|}}}}}}|0|5}}|https|{{{1|{{{URL|}}}}}}|https://{{{1|{{{URL|}}}}}}}}}} {{#if:{{{2|{{{name|}}}}}}|{{{2|{{{name|}}}}}}|Official website}}]|<span class="error">No URL specified for Official website template</span>}}</includeonly><noinclude>
== Usage ==


--><noinclude>{{documentation}}</noinclude>
This template formats official website links for use in external links sections.
 
=== Syntax ===
<pre>
{{Official website|example.com}}
{{Official website|example.com|Custom link text}}
{{Official website|https://example.com}}
{{Official website|URL=example.com}}
{{Official website|URL=example.com|name=Custom link text}}
</pre>
 
=== Parameters ===
{| class="wikitable"
|-
! Parameter !! Description !! Required
|-
| 1 or URL || The website URL (with or without https://) || Yes
|-
| 2 or name || Custom link text (defaults to "Official website") || No
|}
 
=== Examples ===
* <code><nowiki>{{Official website|microsoft.com}}</nowiki></code> produces: [https://microsoft.com Official website]
* <code><nowiki>{{Official website|microsoft.com|Microsoft Corporate Site}}</nowiki></code> produces: [https://microsoft.com Microsoft Corporate Site]
 
[[Category:External link templates]]
[[Category:URL templates]]
</noinclude>

Latest revision as of 13:12, 16 December 2025

Usage

This template formats official website links for use in external links sections.

Syntax

{{Official website|example.com}}
{{Official website|example.com|Custom link text}}
{{Official website|https://example.com}}
{{Official website|URL=example.com}}
{{Official website|URL=example.com|name=Custom link text}}

Parameters

Parameter Description Required
1 or URL The website URL (with or without https://) Yes
2 or name Custom link text (defaults to "Official website") No

Examples