"Template:Anchor/doc" ke revisions ke biich ke antar

m
Bot: Replace deprecated <source> tag and "enclose" parameter [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html]
(Panna jisme "{{Documentation subpage}} {{high-use|36,000+}} {{lua|Module:Anchor}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS LINKS AT THE END OF THIS PAGE --> The tem..." hae ke banae dewa gais hae.)
 
m (Bot: Replace deprecated <source> tag and "enclose" parameter [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html])
 
 
===Use in tables===
Anchors may be used within tables, subject to certain restrictions. The {{tlx|anchor}} template may be used in the caption and cells of a table, but not those portions of a table that are outside the caption and cells. It is used on the table's caption thus:<source enclose=divsyntaxhighlight lang="text">|+ {{anchor|FooX}} A table caption</sourcesyntaxhighlight> and the following forms of cell are valid:<source enclose=divsyntaxhighlight lang="text">!{{anchor|Foo1}} A header cell
!style="background:white;" |{{anchor|Foo2}} A header cell with styling
|{{anchor|Foo3}} A data cell
|rowspan=2 |{{anchor|Foo4}} A data cell spanning two rows</sourcesyntaxhighlight> You need to ensure that the {{tlx|anchor}} is not in that portion of the markup intended for the classes, styles etc. Thus, {{tlx|anchor}} cannot be placed anywhere on lines that begin with <code><nowiki>{|</nowiki></code> (start of table) or <code><nowiki>|-</nowiki></code> (new row), and the following forms of cell are not valid:<source enclose=divsyntaxhighlight lang="text">!{{anchor|Foo1}} |A header cell
!style="background:white;" {{anchor|Foo2}} |A header cell with styling
|{{anchor|Foo3}} |A data cell
|rowspan=2 {{anchor|Foo4}} |A data cell spanning two rows</sourcesyntaxhighlight> If it is necessary for an anchor to be in any of these positions, a different technique is used - the <code>id=</code> attribute. This is placed in that portion of the markup where the classes, styles etc. may be used, as follows:<source enclose=divsyntaxhighlight lang="text">{| id=FooX class=wikitable
|- id=FooY
!id=Foo1 |A header cell
!style="background:white;" id=Foo2 |A header cell with styling
|id=Foo3 |A data cell
|rowspan=2 id=Foo4 |A data cell spanning two rows</sourcesyntaxhighlight> The <code>id=</code> attribute may appear before, between or after any other attributes that may be present, but only one <code>id=</code> attribute may be used in each of these areas.
 
=== TemplateData ===
13,041

edits