This page is a translated version of the page Manual:$wgEnableScaryTranscluding and the translation is 9% complete.
Parser: $wgEnableScaryTranscluding
Allow templates to be imported/transcluded from another wiki.
Introduced in version:1.5.0 (r9860)
Removed in version:still in use
Allowed values:(boolean)
Default value:false


Enable scary transclusion (transcluding pages or templates from another wiki). Reasons for its somewhat strange name: It's somewhat inefficient.

Both $wgEnableScaryTranscluding and the iw_trans bit in the interwiki table must be set for this to be enabled. Alternatively, you can use Extension:Interwiki to manage this.

How to use scary transclusion

  • Enable $wgEnableScaryTranscluding
$wgEnableScaryTranscluding = true;
  • Make sure the relevant interwiki prefixes have iw_trans set to 1 in the database.

Pure transclusion

You should now be able to type {{wiki:template name}} or {{wiki:main namespace page name}} to transclude the page from a foreign wiki. However, these will transclude the foreign wiki page content to your wiki, not the wikicode of templates, etc. So, with the former, you will see the documentation, if any, but the template will not function, it will be as if you were viewing the template page on the foreign wiki - because you will be. Wikilinks on the transcluded page will appear to be blue links but will link to locations on the foreign wiki.

Raw transclusion

You can also use {{raw:wiki:template name}} to do a raw transclude, where all templates on the foreign page are expanded as if they come from your wiki instead of the other wiki. This will display the results of the wikicode on your wiki. Templates function to the extent required pages exist locally: i.e. where the template displays a link that doesn't exist on the local wiki, the link will be red, where the template includes other templates nested within its code, local templates by those names will be called, and unless the required templates exist in the required form, the template will be broken. File links may function normally, depending on whether InstantCommons is in use on both the local and foreign wikis.


You can substitute scary transcluded templates with {{subst:wiki:template name}} or {{subst:wiki:main namespace page name}}. The results will be similar to using raw but will save the fully expanded code to your wiki. With templates, this will have the effect of copying the code to the local wiki. (note: {{subst:raw:foo}} and {{subst:foo}} appear to be equivalent.)

Transclusion of non-MediaWiki content

This will work for wiki pages from wikis that use software other than MediaWiki to some degree, but the local MediaWiki software will attempt to parse the non-MediaWiki wikitext (such as MoinMoin) and html on the foreign wiki, resulting in some meaningless content and some content displayed other than as expected due to differing rules for dealing with HTML. Transclusion of non-wiki pages (HTML, code, etc.) will display plain text, those portions of any HTML that is allowed by the MediaWiki, and anything which intentionally or unintentionally includes things that MediaWiki interprets as wikicode, which will result in varying degrees of meaninglessness. Ligiloj ne Mediaviki-a vikia paĝo eble esti bluajn ligilojn sed eble ne korekte gvidi al malestantajn lokajn paĝojn.

Vidu ankaŭ