This extension adds the ability to include any page's content into another page, making the content a little more modular. This extension demonstrates using Feather Wiki's built-in functions to render content.
Once installed, the transclusion extension will allow you to use double-braces {{like_this}} using another page's slug to insert that other page's content into the current page at that point.
The content of the other page will be injected into your page display inside of an article
tag with a class of "transclusion" so it can be more easily targeted by CSS. The content includes the title of the page, a link to that page, and the full content of that page in HTML. If you add |raw
{{like_this|raw}}, it will only show the content of the page, excluding the heading and link to the transcluded page.
Installation #
To use the transclusion extension, you can do one of the following things:
- Go to your Wiki Settings and add
to the "Custom Head" text area.<script src="https://feather.wiki/extensions/v1.8.x/transclusion.js"></script>
- Save the transclusion extension file to the same folder as your Feather Wiki file and add
to the "Custom Head" text area in Wiki Settings.<script src="./transclusion.js"></script>
- (This way requires that the
transclusion.js
file always remains in the same folder as your wiki file.)
- (This way requires that the
- Go to the source code for the extension, copy the code, and paste the whole script directly into the "Custom JS" text area in Wiki Settings.
After adding the extension code to your wiki, save your changes and reload the wiki. You will not be able to see the results until you save your wiki and re-load the file.
Other Languages #
This extension is available in the following other languages:
You can use the extension in an available language by adding _language-code
before .js
in any of the instructions above. For example, https://feather.wiki/extensions/v1.8.x/transclusion_hu.js
for Hungarian.
Previous Versions #
Starting with Version 1.8.0, extensions are now stored in paths that include the minor version number (i.e. extensions for version 1.8.0 are stored in extensions/v1.8.x/
) to indicate that they are incompatible with lower version numbers. The version of this extension compatible with versions of Feather Wiki below 1.8.0 can still be found at https://feather.wiki/extensions/transclusion.js
, but the old version will no longer receive updates.