WikiTransclusion respectively -Inclusion means displaying (a part of) page B's content on page A on the fly.

On InterWiki, several issues are discussed about accessing information from other Wiki sites. An extra tool in the toolbox might be to have some simple markup for ''including'' or ''transcluding'' information from other sites, or even from other local pages.


Inclusion is probably the easiest to implement. In ZWiki this can be done quite easily with dtml. Some form of tag which fetches a page (from this or another server) and includes it in the current page when it is displayed. Issues remain about what to do about headers, footers or unbalanced HTML if found in the remote page. Also, some transformation might have to take place on links local to the page being included, but remote to the including server. See also MeatBall:InternalTransclusion.

Some examples:

Possible solutions:

  <dtml-var "_.getitem('otherpagename').raw">        OR         <dtml-var "FrontPageNews.src()">


Transclusion is more complex, and involves some way of specifying an area of text from another document to include when the current page is displayed. This is only fairly hard when the page to be transcluded is static, but Wiki pages are always free to change, so whether what would be transcluded would make any sense is a different matter.

MeatballWiki:TransClusion has some thoughts on how to transclude on a Wiki (and a definition of transclusion).

Example 1: You write an article and want it to distribute it to several wikis. Instead of updating all affected destination pages everytime you add new content, you write in your own wiki (or the most important destination wiki) and integrate the content into the others.

Example 2: You maintain a wiki about certain topics for which another website has a good definition or introduction (but still changing) and you want to include it on the top of your page. Ie. on your page about Philosophy you want to have the excellent overview of the topic at WikiPedia:Philosophy resp.

Solutions: See TransclusionExampleOne

Discussion: *moved to TransclusionDiscussion?

I just took a stab at including a zwiki page from another page on the zope server that is not in the same wiki (or not in a wiki at all). I tried this a year or two ago and could not find an elegant solution - but now I found this bit of dtml works wonderfully:

 <dtml-with expr="">
 <dtml-var expr="renderLinksIn(stxToHtml(src()))">