Шаблон:Anchor: различия между версиями

Материал из FIJTeam Project Wiki
Перейти к навигации Перейти к поиску
>Burrito Justice
(Anchor template. This, in theory, will allow any text on a page to be referenced if it has the appropriate template applied. This is will very useful on the upcoming chemistry page rework that I'm planning on doing.)
 
м (Защитил страницу Шаблон:Anchor ([Редактирование=Разрешено только администраторам] (бессрочно) [Переименование=Разрешено только администраторам] (бессрочно)))
 
(не показаны 2 промежуточные версии 2 участников)
Строка 1: Строка 1:
<includeonly><span id="{{anchorencode:{{{1}}}}}"></span></includeonly>
{{#if:{{{1|}}}|<span id="{{{1|}}}"></span>}}<noinclude>
== How to use ==
<pre>
<nowiki>{{anchor|Firesuit}}</nowiki>
</pre>
The anchor template works for making internal links to specific parts of pages. For example, linking to [[Engineering_Items#Firesuit]] (Assuming you already have the anchor on the engineering items page to direct the link) will load the page focused on the firesuit. This is useful when you don't have a <nowiki>===header===</nowiki> for the item in the page.
 
Important note though; If the page already has a header with the same name as an anchor, a link to anchored item will go to whichever is first. so if the anchor is higher than the header, it will go to the anchor and vice versa. Alternatively, you can just make the anchor have a slightly different name to fix this.
 
[[category:Шаблоны]]
</noinclude>

Текущая версия от 22:33, 17 июня 2024

How to use

{{anchor|Firesuit}}

The anchor template works for making internal links to specific parts of pages. For example, linking to Engineering_Items#Firesuit (Assuming you already have the anchor on the engineering items page to direct the link) will load the page focused on the firesuit. This is useful when you don't have a ===header=== for the item in the page.

Important note though; If the page already has a header with the same name as an anchor, a link to anchored item will go to whichever is first. so if the anchor is higher than the header, it will go to the anchor and vice versa. Alternatively, you can just make the anchor have a slightly different name to fix this.