Difference between revisions of "Transclusion"
Rand Linden (talk | contribs) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 15: | Line 15: | ||
: <nowiki>{{:Transclude_me2}}</nowiki> | : <nowiki>{{:Transclude_me2}}</nowiki> | ||
[[Transclusion_example|See the live example on " | [[Transclusion_example|See the live example on "Transclusion_example".]] | ||
== What about other namespaces? == | == What about other namespaces? == | ||
If the page is in another namespace, fully include its namespace + name. For instance, if you wanted to transclude "[[Linden Lab Official:Can my computer run Second Life?]]", you'd insert this on the destination page: | If the page is in another namespace, fully include its namespace + name. For instance, if you wanted to transclude "[[Linden Lab Official:Can my computer run Second Life?]]", you'd insert this on the destination page: | ||
: <nowiki>{{Linden Lab Official:Can my computer run Second Life?}}</nowiki> | : <nowiki>{{:Linden Lab Official:Can my computer run Second Life?}}</nowiki> | ||
For an example page, see [[Linden Lab Official:FAQs (Getting Started)]]. | |||
Note that only Linden Lab employees can edit articles in that particular namespace, but you can still include their unmodified content on other pages. | Note that only Linden Lab employees can edit articles in that particular namespace, but you can still include their unmodified content on other pages. | ||
Line 27: | Line 29: | ||
Transclusion can also be ''partial'' — a section of an article rather than the whole thing. For more information on that and other subtleties, [http://en.wikipedia.org/wiki/Wikipedia:Transclusion see Wikipedia's article on Transclusion]. | Transclusion can also be ''partial'' — a section of an article rather than the whole thing. For more information on that and other subtleties, [http://en.wikipedia.org/wiki/Wikipedia:Transclusion see Wikipedia's article on Transclusion]. | ||
[[Category: | === LSL Portal === | ||
Throughout the [[LSL Portal]] transclusion is used extensively: tables of constants, stealth variable setup, and {{LSLGC|Newbie Notes}} (see [[llSetColor]] for an example of Newbie Notes transclusion). The article to make the most extensive use of this would be [[llSetLinkPrimitiveParams]]. With the LSL Portal, content is not assembled in a linear order, portions of the content are stored and later retrieved from variables. This allows for templates and transcluded articles to (stealthily) contribute content without being forced to follow the traditional linear composition pattern. The end result is that content can be built and modified by the wikicode, not just copy & paste style transcluded. The disadvantage of this is not always knowing where content is coming from; linear composition makes finding the source of offending wikicode much easier. | |||
[[Category:Wiki]] |
Latest revision as of 09:26, 4 March 2011
"Transclusion", for our purposes, is inserting one article into another via simple wikicode. This basically the same as using a template, since an article can be flexibly transcluded into as many other articles as desired.
Since transclusion leaves the original article(s) intact, they may be viewed independently with their original page title, which is important for SEO (Search Engine Optimization). Transcluding multiple short articles into a longer one carries the benefit of collecting related information — such as a FAQ — on a single page without having to wade through multiple pages. In addition, any edits done to the original article will be reflected on the compiled page, saving time.
In short, transclusion is a win-win situation when presenting the same information in multiple ways.
How to transclude
If the page is in the Main namespace, precede it with a colon like this:
- {{:PAGENAME}}
So if we wanted to transclude pages named "Transclude_me" and "Transclude_me2", we'd insert:
- {{:Transclude_me}}
- {{:Transclude_me2}}
See the live example on "Transclusion_example".
What about other namespaces?
If the page is in another namespace, fully include its namespace + name. For instance, if you wanted to transclude "Linden Lab Official:Can my computer run Second Life?", you'd insert this on the destination page:
- {{:Linden Lab Official:Can my computer run Second Life?}}
For an example page, see Linden Lab Official:FAQs (Getting Started).
Note that only Linden Lab employees can edit articles in that particular namespace, but you can still include their unmodified content on other pages.
Advanced usage
Transclusion can also be partial — a section of an article rather than the whole thing. For more information on that and other subtleties, see Wikipedia's article on Transclusion.
LSL Portal
Throughout the LSL Portal transclusion is used extensively: tables of constants, stealth variable setup, and Newbie Notes (see llSetColor for an example of Newbie Notes transclusion). The article to make the most extensive use of this would be llSetLinkPrimitiveParams. With the LSL Portal, content is not assembled in a linear order, portions of the content are stored and later retrieved from variables. This allows for templates and transcluded articles to (stealthily) contribute content without being forced to follow the traditional linear composition pattern. The end result is that content can be built and modified by the wikicode, not just copy & paste style transcluded. The disadvantage of this is not always knowing where content is coming from; linear composition makes finding the source of offending wikicode much easier.