Difference between revisions of "Help:Transclusion"
From Roll20 Wiki
Andreas J. (Talk | contribs) (transclude from Help:Contents) |
Andreas J. (Talk | contribs) m |
||
Line 1: | Line 1: | ||
<noinclude>{{revdate}} | <noinclude>{{revdate}} | ||
− | {{main|Help:Contents}}</noinclude><includeonly>{{main|Help:Transclusion}}</includeonly> | + | {{main|Help:Contents}}</noinclude> |
+ | <includeonly>{{main|Help:Transclusion}}</includeonly> | ||
'''[https://www.mediawiki.org/wiki/Help:Transclusion MediaWiki: Transclusion]''' - include parts of one page into another page, which avoids needing to update several pages if they have a shared section transcluded from a separate page. | '''[https://www.mediawiki.org/wiki/Help:Transclusion MediaWiki: Transclusion]''' - include parts of one page into another page, which avoids needing to update several pages if they have a shared section transcluded from a separate page. | ||
If a large page has sections transcluded to a sub-page, it also makes it easier to link & redirect to the section if it exists on on a separate page, as the | If a large page has sections transcluded to a sub-page, it also makes it easier to link & redirect to the section if it exists on on a separate page, as the | ||
− | * <code><nowiki><noinclude></nowiki></code> - Content within the <code><nowiki> | + | * <code><nowiki><noinclude></nowiki></code> - Content within the <code><nowiki><noinclude> </noinclude></nowiki></code> tags is excluded from transclusion on the target page. This content still appears on the source page. |
− | * <code><nowiki><includeonly></nowiki></code> - Content within the <code><nowiki> | + | * <code><nowiki><includeonly></nowiki></code> - Content within the <code><nowiki><includeonly> </includeonly></nowiki></code> tags is transcluded on the target page, but does not appear on the source page. |
− | * <code><nowiki><onlyinclude></nowiki></code> - Content within the <code><nowiki> | + | * <code><nowiki><onlyinclude></nowiki></code> - Content within the <code><nowiki><onlyinclude> </onlyinclude></nowiki></code> tags is transcluded on the target page, and also appears on the source page. |
'''Examples:''' | '''Examples:''' |
Revision as of 12:05, 12 January 2022
Page Updated: 2022-01-12 |
Main Page: Help:Contents
MediaWiki: Transclusion - include parts of one page into another page, which avoids needing to update several pages if they have a shared section transcluded from a separate page.
If a large page has sections transcluded to a sub-page, it also makes it easier to link & redirect to the section if it exists on on a separate page, as the
-
<noinclude>
- Content within the<noinclude> </noinclude>
tags is excluded from transclusion on the target page. This content still appears on the source page. -
<includeonly>
- Content within the<includeonly> </includeonly>
tags is transcluded on the target page, but does not appear on the source page. -
<onlyinclude>
- Content within the<onlyinclude> </onlyinclude>
tags is transcluded on the target page, and also appears on the source page.
Examples:
- Help:Transclusion
- Player transclude the list from Player API
- Macro Guide is such a large page, it have multiple sections transcluded from other pages, such as Markdown & Order of Operations
- Building Character Sheets is another large page with some sections transcended.