Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Transclusion
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Advanced concepts == {{Main|Help:Advanced transclusion}}<!-- Temporary move of paragraph from lede of this help document to this subsection per discussion at talk (Help talk:Transclusion#Make sense of lede paragraph on parsing and HTML syntax fragments) until such time as [[Help:Advanced transclusion]] is created. Comment 2025-02-18. --> Transclusion occurs before [[parsing]] and can emit syntax fragments, like HTML entities, to preserve them in the final render. The content being transcluded is processed and embedded before the target page is parsed and fully rendered. When transclusion happens at the HTML layer before parsing, it allows certain content β like syntax fragments such as [[character entity references]] like <code>&</code> and <code>mp;</code> or specific HTML components β to be inserted in their original form and preserved in the final render. However, this approach may cause pages to render incorrectly or violate the [[principle of least surprise]] for the reader.{{refn|group=lower-alpha|For example, if [[Whitespace character|whitespace]], tabs, and [[newline]] HTML code are preserved without parsing, the final page may display awkward spacing, misalignments, or unexpected breaks. This whitespace is usually added in the source code to improve readability for developers and isnβt intended to appear in the published content.}} It should be used sparingly when cleaner alternatives are not available. Emitting fragments of template syntax, such as opening braces (<code><nowiki>{{}}</nowiki></code>), is unlikely to re-parse correctly as template syntax in the target page, and it is unwise to rely on such behavior unless formally documented.<!--tested on an older MediaWiki, newer versions may re-parse correctly. Dated unknown. -->
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)