Transclusion facts for kids
Transclusion is a cool way to share information between different online documents without having to copy and paste it. Imagine you have a special note, and you want it to appear in many different places. Instead of copying it everywhere, you just link to it. If you change the original note, all the places where it's linked will automatically show the new changes! It's like having a live connection.
The word "transclusion" comes from "trans," meaning across, and "inclusion," meaning to include. So, it means including something that's brought across from another place.
How Transclusion Works
On websites like Wikipedia, transclusion is often used to put content from a special page, called a template, into many other articles. But it can also work for other types of pages too.
When you see something like `Template:Page name` in the wiki code, the computer program knows you want to include the content of "Page name" right there. The program goes, reads that page, and puts its content into the current page before showing it to you in your web browser. This is transclusion in action! You're telling the computer to "reference" that other page.
Including Parts of Pages
Sometimes, you might only want to include a specific part of a page, like just one section. There are ways to do this, and also ways to exclude certain parts of a page from being transcluded. But the main idea stays the same: you're bringing content from one place to another without copying it.
Nested Transclusion
A page that is transcluded can also include content from other pages itself. This is called "nesting." Think of it like a set of Russian dolls: one page includes another, which includes another, and so on. This can happen a few times, but there's a limit. This limit stops the computer program from getting stuck in an endless loop if pages accidentally try to include each other forever.