User:Timbeale/transclusion

From SambaWiki
< User:Timbeale
Revision as of 20:27, 27 November 2018 by Timbeale (talk | contribs)

Sandpit page to demonstrate transclusion.

Sometimes you only want to transclude part of a wiki page, e.g. a key paragraph or section. The rest of the wiki page might contain other info that, while still useful, isn't related to the point you want to reiterate.

You can wrap the key paragraph in markers. You can only use these markers once per page. For example:

Here! This paragraph is wrapped in <onlyinclude> markers. It is both visible on the original page it appears on, and any other page that transcludes the original.

There are other transclusion markers - <includeonly> and <noinclude>. However, these get more complicated, as the content it wraps does not appear visible on the original page.