Transcluding wikipedia templates

From Crankshaft Coalition Wiki
Jump to: navigation, search
(New page: Wikipedia templates can be used on this wiki via interwiki transclusion. ==Setup== #In LocalSettings.php, set $wgEnableScaryTranscluding to 'true'. #In includes/parser/Parser.php, set $fo...)
 
(Usage)
 
Line 9: Line 9:
 
Templates are invoked as follows:
 
Templates are invoked as follows:
  
<nowiki>{{raw:Wikipedia:templatename|templatevalue}}</nowiki>
+
<code><nowiki>{{raw:Wikipedia:templatename|templatevalue}}</nowiki></code>
  
So, to invoke the [[:Wikipedia:Template:Rounded]] template
+
So, for example, to invoke the [[:Wikipedia:Template:Rounded]] template, you can use the following:
 +
 
 +
<code><nowiki>{{raw:Wikipedia:Rounded | bg=#f9f9f9 | bc=#aaaaaa | w=75% | content=This is a rounded box template, transcluded from Wikipedia}}</nowiki></code>
 +
 
 +
Which would result in the following:
 +
{{raw:Wikipedia:Rounded | bg=#f9f9f9 | bc=#aaaaaa | w=75% | content=This is a rounded box template, transcluded from Wikipedia}}
 +
 
 +
==Miscellaneous==
 +
You may run into errors when transcluding a template if the template contains other templates.
  
 
==References==
 
==References==
 
*http://www.mediawiki.org/wiki/Manual_talk:$wgEnableScaryTranscluding
 
*http://www.mediawiki.org/wiki/Manual_talk:$wgEnableScaryTranscluding
 +
 +
[[Category:Wiki information]]

Latest revision as of 20:44, 23 September 2009

Personal tools
Namespaces
Variants
Actions
Navigation
Categories
Toolbox