Template:Relative link/doc: Difference between revisions
Appearance
imported>Deadfire m updating |
Tungstenchan (talk | contribs) m Text replacement - "BattleTechWiki" to "BattleIntelligence" |
||
| Line 3: | Line 3: | ||
{{Lua|Module:Path}} | {{Lua|Module:Path}} | ||
The {{Tl|Relative link}} and {{Tl|Relative link implicit}} templates facilitate linking [[ | The {{Tl|Relative link}} and {{Tl|Relative link implicit}} templates facilitate linking [[BattleIntelligence:Subpages|subpages]] and parent pages. If a link is not a subpage or a parent page of the current page the template simply creates a regular link. | ||
== Usage == | == Usage == | ||
| Line 14: | Line 14: | ||
* <syntaxhighlight lang="wikitext" inline>{{rel|Template:Relative link/example}}</syntaxhighlight> | * <syntaxhighlight lang="wikitext" inline>{{rel|Template:Relative link/example}}</syntaxhighlight> | ||
*: ↳ {{rel|Template:Relative link/example}} | *: ↳ {{rel|Template:Relative link/example}} | ||
* <syntaxhighlight lang="wikitext" inline>{{rel| | * <syntaxhighlight lang="wikitext" inline>{{rel|BattleIntelligence:Lua}}</syntaxhighlight> | ||
*: ↳ {{rel| | *: ↳ {{rel|BattleIntelligence:Lua}} | ||
* <syntaxhighlight lang="wikitext" inline>{{rel|.}}</syntaxhighlight> | * <syntaxhighlight lang="wikitext" inline>{{rel|.}}</syntaxhighlight> | ||
*: ↳ {{rel|.}} | *: ↳ {{rel|.}} | ||
| Line 29: | Line 29: | ||
* <syntaxhighlight lang="wikitext" inline>{{reli|Template:Relative link implicit/example}}</syntaxhighlight> | * <syntaxhighlight lang="wikitext" inline>{{reli|Template:Relative link implicit/example}}</syntaxhighlight> | ||
*: ↳ {{reli|Template:Relative link implicit/example}} | *: ↳ {{reli|Template:Relative link implicit/example}} | ||
* <syntaxhighlight lang="wikitext" inline>{{reli| | * <syntaxhighlight lang="wikitext" inline>{{reli|BattleIntelligence:Lua}}</syntaxhighlight> | ||
*: ↳ {{reli| | *: ↳ {{reli|BattleIntelligence:Lua}} | ||
* <syntaxhighlight lang="wikitext" inline>{{reli|.}}</syntaxhighlight> | * <syntaxhighlight lang="wikitext" inline>{{reli|.}}</syntaxhighlight> | ||
*: ↳ {{reli|.}} | *: ↳ {{reli|.}} | ||
| Line 48: | Line 48: | ||
[[Category:Help namespace templates|{{PAGENAME}}]] | [[Category:Help namespace templates|{{PAGENAME}}]] | ||
[[Category:User namespace templates|{{PAGENAME}}]] | [[Category:User namespace templates|{{PAGENAME}}]] | ||
[[Category: | [[Category:BattleIntelligence namespace templates|{{PAGENAME}}]] | ||
[[Category:Template namespace templates|{{PAGENAME}}]] | [[Category:Template namespace templates|{{PAGENAME}}]] | ||
[[Category:Module namespace templates|{{PAGENAME}}]] | [[Category:Module namespace templates|{{PAGENAME}}]] | ||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 01:04, 1 May 2025
| This is a documentation subpage for Template:Relative link. It may contain usage information, categories and other content that is not part of the original template page. |
| This template should always be substituted (i.e., use {{subst:Relative link}}). |
| This template uses Lua: |
The {{Relative link}} and {{Relative link implicit}} templates facilitate linking subpages and parent pages. If a link is not a subpage or a parent page of the current page the template simply creates a regular link.
Usage
Note: The
.. identifier is supported too (e.g. {{rel|../example}}).
{{Relative link}}
{{rel|./example}}{{rel|Template:Relative link/example}}{{rel|BattleIntelligence:Lua}}{{rel|.}}- ↳ .
{{rel}}- ↳ .
(Same as {{Relative link}}, but omitting possible initial dots)
{{reli|./example}}- ↳ example
{{reli|Template:Relative link implicit/example}}{{reli|BattleIntelligence:Lua}}{{reli|.}}{{reli}}
See also
- {{#invoke:path|rel}} and {{#invoke:path|sub}}
- Category:Internal link templates