|
|
| Regel 240: |
Regel 240: |
|
| |
|
| DJ | | DJ |
|
| |
| <!--
| |
| == nog uit te werken ==
| |
| === anchors ===
| |
|
| |
| Tekst van een andere pagina opnemen== (moet nog worden herschreven)-zie [https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion hier]
| |
| How it works <!--T:7-->=== Step 1: Mark off sections === <!--T:8--><!--T:9-->
| |
| Mark off sections in the text using <tvar{{!}}section><code><nowiki><section></nowiki></code> tags like this:
| |
|
| |
|
| |
| <nowiki><section begin=chapter1 />this is a chapter 1<section end=chapter1 /></nowiki>
| |
| <!--T:79--> Note that these tags are not HTML/XML, and do not use the normal attribute syntax.
| |
| <!--T:10--> For this reason, and because the <tvar{{!}}begin><code>begin</code> and <tvar{{!}}end><code>end</code> markers are individual, rather than normal XML open/close tags, this allows nested or overlapping sections. This allows you to insert section tags without worrying about interfering with other sections.</tvar{{!}}end></tvar{{!}}begin>
| |
|
| |
| === Step 2a: Transclude the section === <!--T:11-->
| |
|
| |
| <!--T:12-->
| |
| Call the parser function <tvar{{!}}lst>''#lst'' to transclude it, i.e. to transclude a section called <tvar{{!}}section>''chapter1'' from a page called <tvar{{!}}page>''articleX'':
| |
| </tvar{{!}}page></tvar{{!}}section></tvar{{!}}lst>
| |
|
| |
| <nowiki>{{#lst:articleX{{!}}chapter1}}</nowiki>
| |
|
| |
|
| |
| <!--T:13-->
| |
| The target article defines the location of the section; its behavior is determined by the parser function.
| |
|
| |
| === Step 2b: Transclude the page but excluding the section === <!--T:14-->
| |
|
| |
| <!--T:15-->
| |
| To transclude a page, but exclude a specified section, use the <tvar{{!}}lstx>''#lstx'' function:
| |
| </tvar{{!}}lstx>
| |
|
| |
| <nowiki>{{#lstx:articleX{{!}}chapter1}}</nowiki>
| |
|
| |
|
| |
| <!--T:16-->
| |
| Optionally, you may add replacement text to the excluded section.
| |
|
| |
|
| |
| <nowiki>{{#lstx:articleX{{!}}chapter1{{!}}replacement_text}}</nowiki>
| |
|
| |
|
| |
| <!--T:17-->
| |
| Example:
| |
|
| |
|
| |
| <nowiki>{{#lstx:articleX{{!}}chapter1{{!}}See chapter 1 in [[articleX]].}}</nowiki>
| |
|
| |
|
| |
| <!--T:18-->
| |
| The replacement text will appear in the area where the section is skipped (excluded).
| |
|
| |
|
| |
| </tvar{{!}}section> -->
| |