The official discord link if you wish to join the discord: https://discord.gg/j5RKwCvAFu

The background art comes from Cherylann1960.

Template:LinkType

From The Codex
Revision as of 16:54, 23 April 2023 by Template>The Magic Wand (→‎Usage: Standardizing Maintenance Categories)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Purpose

This template is a small formatting template that tests if a text string is a URL or not. This is intended to be used as a tool in other templates for simply differentiating between internal and external links.

Usage

To use this template, type: {{#vardefine:parameters|{{#vardefine:count16|0}}{{#vardefine:count15|0}}{{#vardefine:count14|0}}{{#vardefine:count13|0}}{{#vardefine:count12|0}}{{#vardefine:count11|0}}{{#vardefine:count10|0}}{{#vardefine:count9|0}}{{#vardefine:count8|0}}{{#vardefine:count7|0}}{{#vardefine:count6|0}}{{#vardefine:count5|0}}{{#vardefine:count4|0}}{{#vardefine:count3|0}}{{#vardefine:count2|0}}{{#vardefine:count1|1}}{{#vardefine:count|Expression error: Unrecognized punctuation character "{".}}{{#var:count}}}}{{#vardefine:content| }}    {{LinkType{{#var:content}}}}

If the provided link is a http:// URL, it will return external, if it's not, it will assume it is an internal wiki link and return internal. These results can be used in parser functions within other templates.