Include Other Pages

Short Description
Provides a way to extract code from other Wikidot pages and inject it onto your Wikidot page

If you want to include contents of another page use:

[[include pagename]]

or

[[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 page use:

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

As you can see you can split variable definitions over several lines for cleaner code.

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 [[image 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]]

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

page revision: 0, last edited: 02 May 2010 07:23
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /