MeatballWiki | RecentChanges | Random Page | Indices | Categories

From GradualViewPoint...

An InternalTransclusion (or simply "inclusion") is a TransClusion, but of a content item on the site itself. For instance, instead of random pages on the WorldWideWeb, internal pages on the wiki. e.g.


but not

!TRANSCLUSION http://www.example.org

Start with '!' or '#'? See EscapeMetaCharacters.


MediaWiki has implemented a weaker form of this with their "MediaWiki:" namespace, which contains all boilerplate text on a series of special pages. By editing these pages you can change, for example, the appearance of the Preview button, or modify the text given to a new user. You can also create new pieces of standard text that can be included elsewhere. Hopefully this will be made more general in due course.


I'm using internal transclusion in a 'Tavi wiki at http://allmyfaqs.com/wbt/ which is the read-only (naked) view of a dual-mode wiki. The Intro to HTML (in small chunks) demonstrate the transclusion. The sidebar menu is a transcluded file in which the URL of the current page is picked up and highlighted, so one TOC listing can be used throughout the lesson. I've implemented the same function in a local (non-server) personal wiki engine (http://hytext.com/cgi-bin/wiki.pl?IWiki_Site_Writer with the Help files put up as a demo of the product's '''convert to HTML" option at http://hytext.com/iwiki/ ). Now I'm trying to get the transclusion working on the UseMod engine, so I can transfer pages from the personal wiki to a server-based wiki and retain the transclusion functionality. I'm looking at this, so far:

sub CommonMarkup {
  my ($text, $useImage, $doLines) = @_;
  local $_ = $text;

  if ($doLines < 2) { # 2 = do line-oriented only
    # find and insert included files
    #if(/\@\@inc\s(.*?)\n/) {
    # #get transclude file $1
    # #split $text into pre-pattern and post-pattern chunks
    # # reassemble pre-pattern + transcludetext + post-pattern back into $text
If someone has worked this out already, I love to see the code. Suggestions would also be much appreciated. -- JerryMuelver


MeatballWiki | RecentChanges | Random Page | Indices | Categories
This page is read-only | View other revisions | Search MetaWiki