Include Other Pages

[Jump to End]

Include Pages:

If you want to include the contents of another page into the current page at a given point, use:

[[include pagename]]


[[include :sitename:pagename]]

The include tag should start and end with a newline. [[include]] tags are parsed inside code blocks. To prevent an [[include]] tag from being parsed, put a space in front of it. This does make copy/paste of example code that contains [[include]] tags a problem.

The sitename can be a Wikidot subdomain (e.g. :www) or a full name, including a custom domain.

The [[include]] tag can also take parameters and substitute variables in the included source. To denote variables in the included page use:

{$var1}, {$number_books}, {$title}, {$variable_name}, {$variableName}

and in the including (calling) page use something like the following:

[[include pagename var1=value1 number_books= 43 title = Best Wiki Ever variable_name = just a variable variableName=another variable ]]

Includes across sites are called cross-site includes or CSIs. CSIs are a powerful way to link page templates and code from other sites.

NOTE: includes and images/files: The [[include]] works just by inserting the page source at a given place. If you have any images or files attached in the included page and you refer to them as filename.jpg in the included page, please rather use the image/file source with the name of the page too, e.g. '[[image included-page/filename.jpg]]'. Be aware that images must be located on a local page of the site hosting the include page source to be displayed as thumbnails. Cross-site images will display full-sized in the include page code.


Include Page (as a Table):
||~ Ref ||~ World ||~ Location ||~ Heading ||~ Position ||~ Map image ||
|| {$ref} || {$world} || {$location} || {$heading} || {$position} || {$map-image} ||

Calling Page:
[[include RefLoc-block |
title=LOD |
ref=01 |
world=Tamriel |
location=-1, 20 |
heading=327.75 |
position=-41, 83403, -5 |
map-image=[[image /oblivion:lods/TESTG_Loc001_Map_Image_Match_Vanilla.jpg size="square" title="Reference 01 Map" alt="In-game World map displaying the cursor at Reference Location 01"]] |


Ref World Location Heading Position Map image
01 Tamriel -1, 20 327.75 -41, 83403, -5 In-game World map displaying the cursor at Reference Location 01

As you can see in the code section, you can split variable definitions over several lines by ending each line with " |" for cleaner code.

[Back to top]
[Jump to End]

List of Include Pages:

[Back to top]

Return to General Information page

Back to General Information

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License