Table of contents
- 1. Creating hyperlinks
- 1.1. Template:AlphabeticalTOCForTag
- 1.2. Template:anch
- 1.3. Template:bug
- 1.4. Template:CSSLiveSample
- 1.5. Template:DOMLiveSample
- 1.6. Template:HTMLLiveSample
- 1.7. Template:SVGLiveSample
- 1.8. Template:JSFiddleLink
- 1.9. Template:enter-bug
- 1.10. Template:ifmethod and Template:ifattribute
- 1.11. Template:Include
- 1.12. Template:ListSubpages
- 1.13. Template:manch
- 1.14. Template:Interwiki
- 1.15. Template:LXRSearch
- 1.16. Template:RFC
- 1.17. Template:seealso_tag
- 1.18. Template:SeeDOMInterface
- 1.19. Template:source
- 1.20. Template:source_cvs
- 1.21. Template:spec
- 1.22. Template:SVGLiveSample
- 1.23. Template:taggedsubpages
- 1.24. Template:TOCSectionForTag
- 1.25. Template:WebkitBug
- 2. Linking to pages in references
- 3. Tagging pages
- 4. General-purpose templates
- 4.1. Template:block-title
- 4.2. Template:Clr
- 4.3. Template:Embed_text
- 4.4. Template:EmbedSVG
- 4.5. Template:Gecko
- 4.6. Template:hX_gecko_minversion
- 4.7. Template:Note and Template:warning
- 4.8. Template:ref and Template:endnote
- 4.9. Template:deprecated_inline
- 4.10. Template:non-standard_inline
- 4.11. Template:obsolete_inline
- 4.12. Template:js_obsolete_inline
- 4.13. Template:js_obsolete_header
- 4.14. Template:optional_inline
- 4.15. Template:MobileOnlyInline
- 4.16. Template:MobileOnlyHeader
- 4.17. Template:renamed_inline
- 4.18. Template:unimplemented_inline
- 4.19. Template:unimplemented_inline_webkit
- 4.20. Template:Previous, Template:Next, and Template:PreviousNext
- 4.21. Template:localString
- 5. Version information templates
- 6. Nesting templates
- 7. See also
- How to help: contents
- Lists
- Documentation wishlist
- Editing/review to do list
- Migration list
- Guides
- Getting started
- Writer's guide
- How to document Mozilla
- Writing interface reference documentation
- Page naming guide
- Disambiguation pages
- Localizing MDC
- Copyrights and licensing
- References
- MDC formatting guide
- Custom CSS classes
- Custom templates
- External redirects
- Needs redirect
This page lists some of general-purpose templates created for use on MDC. A complete list can be found by clicking here. We don't need to list all of them here.
See also the list of custom CSS classes.
{{template("template-name", [param1 [, ..., paramN])}}. That's because the minus sign is interpreted by the script engine as attempting to do a mathematical operation, which isn't what you want here.Creating hyperlinks
Template:AlphabeticalTOCForTag
Template:AlphabeticalTOCForTag inserts a table of contents of all articles with a specified tag. An optional second parameter lets you apply a template to be used when rendering the links; for example: {{AlphabeticalTOCForTag("HTML:Element Reference", "HTMLElement")}} uses Template:HTMLElement to render the items in the TOC.
Template:anch
Template:anch inserts a link to an anchor. {{Anch("top")}} produces <a href="#top">top</a> (top). Note that with this template you cannot choose a link description that is different from the anchor's name. The idea was to create a template that allows easy linking to other sections in a document.
Template:bug
Template:bug allows you to link to a bug on bugzilla.mozilla.org easily using this syntax: {{Bug(123456)}}. This gives you:
bug 123456
.
Template:CSSLiveSample
Template:CSSLiveSample lets you create a button linking to a sample in the CSS Reference; these samples should be sent to Eric Shepherd for uploading. These should be used on CSS Reference pages when linking to live, standalone sample pages. The template accepts one parameter, the name of the HTML file to link to.
Template:DOMLiveSample
Template:DOMLiveSample lets you create a button linking to a sample in the DOM Reference; these samples should be sent to Eric Shepherd for uploading. These should be used on DOM Reference pages when linking to live, standalone sample pages. The template accepts one parameter, the name of the HTML file to link to.
Template:HTMLLiveSample
Template:HTMLLiveSample lets you create a button linking to a sample in the HTML Reference; these samples should be sent to Eric Shepherd for uploading. These should be used on HTML Reference pages when linking to live, standalone sample pages. The template accepts one parameter, the name of the HTML file to link to.
Template:SVGLiveSample
Template:SVGLiveSample lets you create a button linking to a sample in the DOM Reference; these samples should be sent to Eric Shepherd for uploading. These should be used on SVG Reference pages when linking to live, standalone sample pages. The template accepts one parameter, the name of the HTML file to link to.
Template:JSFiddleLink
Template:JSFiddleLink lets you easily create a button linking to a sample on the jsFiddle web site. These should NOT be used to replace in-line samples, or MDC-uploaded samples, but to offer access to secondary examples readers can experiment with. The template accepts one parameter, the ID tag of the jsFiddle item to link to.
Template:enter-bug
Template:enter-bug lets you link to an Enter A Bug page on bugzilla.mozilla.org with specific product and component. For example, {{template("enter-bug", ["Core","Layout"]}} shows up as Core:Layout.
Template:ifmethod and Template:ifattribute
Template:ifmethod and Template:ifattribute let you create a link to a particular method or attribute (respectively) on an interface that's been created using our standard format for interface documentation. For example, {{ifmethod("nsIAutoCompleteSearch","stopSearch"}} shows up as nsIAutoCompleteSearch.stopSearch()
. Note that for Template:ifattribute, id="..." must be added explicitly in the target, since attributes do not have headings.
Template:Include
Template:Include inserts an #include "headername.h" reference that links to the specified file in MXR. This is used in pages that want to have a heading at the top of the page telling you how to include the appropriate header file for the interface being described. For example, {{Include("mozilla/CondVar.h")}} results in:
#include "mozilla/CondVar.h"
Template:ListSubpages
Template:ListSubpages generates an unordered list of links to all the immediate children of the current page; useful for automatically generating tables of contents for sets of documentation.
Template:manch
Template:manch inserts a link to a method within the current interface; this is intended only for use in interface documentation pages. {{manch("foo")}} produces <code><a href="current/path#foo">foo()</a></code> (foo()).
Template:Interwiki
Template:Interwiki makes it easy to create interwiki links. Currently it supports linking to Wikipedia and Wikimo. The first parameter is the name of the wiki ("wikipedia" or "wikimo"), and the second is the path of the article. For example, {{template.interwiki("wikipedia", "Firefox")}} shows up as Firefox . This template auto-detects the page language and directs to the same language on Wikipedia, for example.
Template:LXRSearch
Template:LXRSearch can be used (somewhat painlessly) to create an LXR search URL. The syntax is as follows: {{LXRSearch|type|param|search-string|link-text}}. The parameters are used in the following ways:
- type must be one of search (a string search through source), find (a file name search), or ident (a search through token names in Mozilla source).
- param must be one of string (for string/file name searches) or i (for token searches). If templates had some conditional power we could get away with one parameter instead of two, but they don't. An extension could probably work around this, as always.
- search-string is whatever you would type in the search box on LXR if you were doing the search there, except that spaces should be converted to +.
- link-text is the text for the link that will be created.
Template:RFC
Template:RFC creates a link to the specified RFC, given its number. The syntax is simply: {{RFC(number)}}. For example, {{RFC(2616)}} becomes RFC 2616.
Template:seealso_tag
Template:seealso_tag inserts a bullet list of articles that are tagged with the specified tag. This makes it easy to list potentially relevant articles in a "See also" section.
Template:SeeDOMInterface
Template:SeeDOMInterface inserts a blurb of text explaining that a specified interface implements a given DOM interface. Use this to create simple stub pages for Gecko interfaces that simply implement standard interfaces in the DOM. For example: {{SeeDOMInterface("nsIDOMHTMLFormElement", "HTMLFormElement")}} looks like this:
The nsIDOMHTMLFormElement
interface implements the DOM HTMLFormElement
interface. See that page for details.
Template:source
Template:source allows you to link to a Mozilla source code file without having to type a long MXR URL using this syntax: {{Source("browser/Makefile.in")}}. This gives you:
browser/Makefile.in. The text of the link is the path provided; if you want different text, then just provide a second parameter, like so: {{Source("browser/Makefile.in", "the browser/ Makefile.in")}}, which produces
the browser/ Makefile.in. Note that the link will be to the very latest version of the file in bleeding-edge code.
Template:source_cvs
Template:Source_cvs works just like Template:source, except it links to the CVS repository instead of the newer mozilla-central one.
Template:spec
Template:spec inserts a link to a specification; it's intended for use in "See also" and "Specification" sections, rather than in the body of articles. It accepts one required and two optional parameters: the first is the full URL of the specification, the second is the optional link text to display (if not provided, the URL is just inserted, so you should provide this parameter), and the third is an abbreviation indicating the status of the specification. The status may be one of:
- WD
- Working Draft
- LC
- Last Call
- CR
- Candidate Recommendation
- PR
- Proposed Recommendation
- REC
- Recommendation
If specified, the status results in a small, color-coded box being drawn next to the specification link. For example: {{spec("http://www.w3.org/TR/FileAPI/#dfn-Blob", "File API Specification: Blob", "WD")}} results in:
Template:SVGLiveSample
Template:SVGLiveSample lets you create a button linking to a sample in the SVG documentation; these samples should be sent to Eric Shepherd for uploading. These should be used on SVG documentation pages when linking to live, standalone sample pages. The template accepts one parameter, the name of the HTML file to link to. The rest of the path is inserted automatically.
Template:taggedsubpages
Template:taggedsubpages inserts a bulleted list of subpages of the page on which it's used that have the specified tag. For example: {{taggedsubpages("foo")}}
Template:TOCSectionForTag
Template:TOCSectionForTag inserts a table of contents of all articles with two specified tags. An optional third parameter lets you apply a template to be used when rendering the links; for example: {{TOCSectionForTag("HTML:Element Reference", "Deprecated", "HTMLElement")}} uses Template:HTMLElement to render the items in a list of all deprecated HTML elements, as below:
Template:WebkitBug
Template:WebkitBug inserts a link to a bug in the WebKit bug database. For example, {{WebkitBug(31277)}} inserts WebKit bug 31277.
Linking to pages in references
- Template:jsapixref can be used to link to a page in the JSAPI Reference.
- Similarly, Template:cssxref can be used to link to a page in the CSS Reference.
Example: {{cssxref("cursor")}}, results in:cursor. - Likewise, Template:domxref links to pages in the DOM reference; if you include parentheses at the end, the template knows to display the link to look like a function name. For example, {{domxref("document.getElementsByName()")}} results in
document.getElementsByName()while {{domxref("Node")}} results inNode. - Template:HTMLElement links to an HTML element in the HTML Reference.
- Template:SVGElement links to an SVG element in the SVG Reference (which doesn't exist yet, but these links may help encourage its creation).
- Template:npapi should be used for links in the Gecko Plugin API Reference.
- Template:funcref should be used for links to global functions (usually C++) documented on top-level pages. The template wraps the function name in a
<code>tag and adds parentheses after the name. You can specify the params in the optional second argument. See the template page for examples. - Template:interface and Template:named-interface should be used when linking to interfaces.
Example: {{interface("nsIIOService")}} results in:nsIIOService. - Template:interface-method can be used to link to a method of an interface in case the target interface is documented according to the current guidelines.
Example: {{template("interface-method", ["nsIFeedResult", "registerExtensionPrefix"])}} , result:nsIFeedResult.registerExtensionPrefix(). You can also use Template:interfacemethod which does the same thing but uses the standard {{interfacemethod("nsIFeedResult", "registerExtensionPrefix")}} syntax.
Tagging pages
These templates should be placed at the top of a page (but below the breadcrumbs). Some templates can be also used at the top of a section.
Template:disambig
Template:disambig is used on the few disambiguation pages we have.
Template:outdated
The template outdated should be used to tag pages that are known to be (or might be) horribly outdated.
The template is followed by an optional parameter, which can be used to provide details.
Example: {{outdated("It was last updated in 1999.")}} gives you this:
Template:NeedsTechnicalReview
A similar template, NeedsTechnicalReview is for less hopeless cases when an author or an editor was unsure if something he read or wrote was technically correct.
{{NeedsTechnicalReview()}} results in:
Template:LockedPage
Template:LockedPage inserts a mark bar across the page that provides an explanation for why a page is locked. There are two parameters: the first is the length of time for which the page is expected to be locked, and the second is the reason why it's locked. A link to the page's discussion page is also included in the bar.
Template:ReleaseChannelInfo
Template:ReleaseChannelInfo is used to create the standard header at the top of "Firefox X for developers" pages for a given channel; it takes four parameters: the Firefox version, the Gecko version, a string indicating an expected release date, and the name of the channel on which the release can currently be downloaded. For example, {{ReleaseChannelInfo(7, "7.0", "the fall of 2011", "aurora")}} yields:
Firefox 7, based on Gecko 7.0, will ship in the fall of 2011. This article provides information about the changes in this release that will affect developers. Nightly builds of what will become Firefox 7 are currently available on the Aurora channel.
Template:deprecated_header, non-standard_header, obsolete_header
Template:deprecated_header inserts a deprecated mark bar spread out across the page to discourage the use of, e.g., a function, method or property which is officially deprecated. The deprecated bar typically would be placed directly underneath the main page title (or breadcrumb navigation if available) of, e.g., a specific function, method or property specification page.
{{deprecated_header()}} Result:
Similarly, Template:non-standard_header and Template:obsolete_header can be used to mark non-standard and obsolete functionality.
{{template("Non-standard_header")}} Result:
{{obsolete_header()}}. Result:
Templates tagging pages in the references/guides/tutorials
There are a number of templates for almost each large collection of pages (such as the DOM reference. They typically link back to the main page of the reference/guide/tutorial (this is often needed because our breadcrumbs sometimes can't do this) and put the article in the appropriate category.
E.g.: Template:DomRef, Template:CSSRef, Template:jsapi ref header, ...
General-purpose templates
Template:block-title
Template:block-title can be used to create bolded text which visually serves as a title for a block in a page, does not appear in the auto-generated table of contents, and can act as a link target just as headings do. The syntax is: {{template("block-title", [title]}}, where title is whatever you want displayed. title also serves as the target for links to the section you are titling. Template:block-title is meant for use in titling Template:sidenotes, tables, images, and code blocks, particularly in places where you'll be referring to the item more than once or in places not close to the item itself.
Template:Clr
Template:Clr inserts a <br style="clear:both;" /> to make sure the text following it is below any floating images or other figures. Usage: {{clr()}}.
- Please note that using this template may mess up the layout of the whole page, e.g., if the navigational panel in default skin is floated at the left side, everything after {{clr()}} will also be below the navigational panel.
Template:Embed_text
The Embed_text template lets you embed an attached text file into the body of your article. This is helpful if you want to have code snippets that are both downloadable but also displayed within the article's content. You may optionally specify a language for syntax highlighting; if you don't specify one, the text is embedded unformatted. The first parameter is the filename of the attachment to embed; the second, if provided, is the language for the syntax highlighter to apply, such as "javascript", "svg", or "cpp".
Template:EmbedSVG
Template:EmbedSVG embeds an attached XML file as an SVG image, in place on the page. Simply specify the filename of the attached SVG file. You can use this in tandem with Embed_text to show the source and then the rendered output of the same file.
Template:Gecko
The Template:Gecko template inserts the text "Gecko versionnumber" into the text of your article, but adds a tooltip to the text that, when the user hovers over it, displays the corresponding versions of Firefox, Thunderbird, and SeaMonkey. For example, "{{gecko("1.9")}}" looks like this: Gecko 1.9.
Template:hX_gecko_minversion
These templates let you insert headers (h1, h2, and h3) that include at the right end of the line a badge indicating the Gecko version (and corresponding app versions) that the section applies to. For example, {{h3_gecko_minversion("This is important information", "1.9.2")}} looks like this:
This is important information
Template:Note and Template:warning
Template:Note inserts a specially-formatted "note" block into the article's text. This is intended to call out an interesting or important fact. It uses the "note" CSS class. Using the template instead of directly using the class allows us to make more changes to the appearance of the notes more easily in the future.
Usage: {{note("This is an important note.")}}. Result:
Similarly, Template:warning inserts a specially-formatted "warning" block (uses class="warning").
{{warning("Danger, Will Robinson!")}} results in:
Template:ref and Template:endnote
Template:ref and Template:endnote can be used to implement footnotes to articles. The footnote "number" is created using {{ref("something")}}, where something should be some suitably descriptive word for whatever is being mentioned in the footnote. Then, at the end of the document, insert the following to create a numbered list for the footnotes' information:
# {{endnote("something")}} Blah blah, text for first footnote
# {{endnote("something-else")}} The text for another footnote
# ...
Template:deprecated_inline
Template:deprecated_inline inserts an in-line deprecated mark to discourage the use of, e.g., a function, method or property which is officially deprecated.
Usage: {{deprecated_inline()}}. Example:
- Item 1
- Item 2 Deprecated
- Item 3
Template:non-standard_inline
Template:non-standard_inline inserts an in-line non-standard mark to discourage the use of, e.g., a function, method, property, or attribute which has not been standardized.
Usage: {{template('Non-standard_inline')}}. Example:
- Item 1
- Item 2 Non-standard
- Item 3
Template:obsolete_inline
Template:obsolete_inline inserts an in-line obsolete mark to prevent the use of e.g. a function, method or property which is officially obsolete. You can, optionally, include a technology (HTML, CSS, JS, or Gecko) and version in which it became obsolete. The old method of use with just the Gecko version number is available for compatibility only.
Usage: {{obsolete_inline([tech&version])}}. Example:
- Item 1
- Item 2 Obsolete
- Item 3 Obsolete since Gecko 1.9.1
- Item 4
Template:js_obsolete_inline
Please use Template.3aobsolete_inline instead.
Template:js_obsolete_header
Template:js_obsolete_header inserts banner to indicate that a given JavaScript feature is not available any longer; you can optionally include a JavaScript version number in which it became obsolete. Usage: {{js_obsolete_header([javascript version])}}. Example:
Template:optional_inline
Template:optional_inline inserts an in-line "optional" remark, intended to be used to indicate when a parameter to a function is optional.
Usage: {{optional_inline()}}. Example:
- parameterX Optional
- Blah blah blah...
Template:MobileOnlyInline
Template:MobileOnlyInline inserts an in-line "Available only for mobile Firefox" remark; intended for use in tables and lists. It indicates the version of Gecko as of which the interface is still only available for mobile.
Usage: {{MobileOnlyInline(geckoVersion)}}. Example:
- Some item Mobile Only in Gecko 2.0
Template:MobileOnlyHeader
Template:MobileOnlyHeader inserts an "Available only for mobile Firefox" header box. It indicates the version of Gecko as of which the interface is still only available for mobile.
Usage: {{MobileOnlyHeader(geckoVersion)}}. Example:
Template:renamed_inline
Template:renamed_inline inserts an in-line "renamed" mark to indicate that an API has been renamed. You provide the Gecko version in which the change occurred, as well as the new name.
Usage: {{renamed_inline(oldname, geckoversion)}}. Example:
apinameRenamed fromwasapinamein Gecko 1.9
Template:unimplemented_inline
Template:unimplemented_inline inserts an in-line "unimplemented" mark to prevent the use of e.g. a function, method or property which is not yet implemented. You can, optionally, include a bug number indicating the bug covering the request to implement the feature. Usage: {{unimplemented_inline()}}. Example:
- Item 1
- Item 2 Unimplemented
- Item 3 Unimplemented (see bug 11011 )
Template:unimplemented_inline_webkit
Template:unimplemented_inline_webkit inserts an in-line "unimplemented" mark to prevent the use of e.g. a function, method or property which is not yet implemented. You can, optionally, include a WebKit bug number indicating the bug covering the request to implement the feature. Usage: {{unimplemented_inline_webkit()}}.
Template:Previous, Template:Next, and Template:PreviousNext
Template:Previous, Template:Next, and Template:PreviousNext provide navigation controls for articles which are part of sequences. For the single-way templates, the only parameter needed is the wiki location of the previous or next article in the sequence. For PreviousNext, the two parameters needed are the wiki locations of the appropriate articles. The first parameter is for the previous article and the second is for the next article.
Template:localString
Template:localString is primarily created for template developers and localizers. It takes a map of translated strings and returns a string appropriate for page language. For example,
// Templates return XML documents, so to get a string you have to wrap template result with xml.text()
xml.text(localString({
en: "hello world",
de: "hallo Welt"}));
on a page in https://developer.mozilla.org/en/ subtree returns
hello world
and on a page in https://developer.mozilla.org/de/ subtree returns
hallo Welt
As you might have guessed, page language is determined by taking the first part of the path of page URL. For example, if page URL is
https://developer.mozilla.org/en/JavaScript
then the determined page language is en.
If used on a user's page, the template determines page language from page properties.
If there is no translation provided for current page's language, then English variant is used. So the above example would return
hello world
in https://developer.mozilla.org/it/ subtree.
Version information templates
Interface reference summaries
Every article in the interface reference should start with the interface summary block, which is created using Template:IFSummary. This creates a uniform, standard format block at the top of the page with basic information about the interface. The template accepts up to 7 parameters, but requires only the first four. The parameters are, in order:
- Path of the IDL file defining the interface
- This is used to create a link to the interface's IDL on MXR so the reader can refer to it if they wish.
- Parent interface
- This is the name of the interface upon which the interface being document is based. This will be turned into a link to that interface in the interface reference and displayed.
- scriptable/not scriptable
- A string indicating whether the interface is scriptable or not. You must use either "scriptable" or "not scriptable" (these are, however, case insensitive). This will be turned into an appropriate indicator in the box, colored green for scriptable interfaces or red for non-scriptable ones. The indicator will also include a link to an article explaining what this means.
- Last changed in what Gecko version
- This is a string indicating the version of Gecko in which the interface was last changed. Should be a string in standard Gecko version format, such as "1.9" or "1.9.2" or even "1.9.1.6".
- Summary Optional
- A brief textual summary of what the interface does. Should be just a sentence or two. This is only optional for backward compatibility with old interface documents using the now deprecated InterfaceStatus template (which now calls through to this one). You should always provide this.
- Version introduced Optional
- If you know the version of Gecko in which the interface was introduced, include that here. This will trigger the inclusion of a version timeline showing the availability of the interface in contrast to the history of Gecko, in graphical format.
- Version deprecated Optional
- If the interface is deprecated, include that here. This will be used when drawing the version timeline diagram.
- Version obsoleted Optional
- Similarly, if the interface is obsolete and no longer available at all, include the Gecko version in which that took effect.
Examples:
{{IFSummary("netwerk/base/public/nsIIOService.idl", "nsISupports", "scriptable", "1.9", "Provides assorted network utility functions, as well as functions to parse URLs.", "1.1", "1.8.1", "1.9.2")}}
nsISupports
Last changed in Gecko 1.9 (Firefox 3)
{{IFSummary("netwerk/base/public/nsIIOService.idl", "nsISupports", "scriptable", "1.9", "Provides assorted network utility functions, as well as functions to parse URLs.", "1.1")}}
nsISupports
Last changed in Gecko 1.9 (Firefox 3)
{{IFSummary("netwerk/base/public/nsIIOService.idl", "nsISupports", "scriptable", "1.9.1")}}
nsISupports
Last changed in Gecko 1.9 (Firefox 3)
Marking articles or sections as specific to a given release
- Template:gecko minversion header
- Template:fx minversion header
- Template:tb minversion header
- Template:js minversion header
Introduced in JavaScript 9.9
- Template:fx_minversion_section
- Template:tb minversion section
Introduced in Thunderbird 3
Version-specific notes and call-out boxes
You can include a Gecko version specific call-out box using a combination of the Template:gecko_callout_heading template and the "geckoVersionNote" CSS class. To do this, write your text, including the use of the heading template, then select it all and click the <div> button in the editor's toolbar. Choose "Version note box" from the style pop-up menu in the dialog box that appears and click OK.
For example:
Everything in this div block is specific to Gecko 1.9. You can include pretty much anything in here, including code samples, headings, and other information, so it's good for everything from small blocks to very large sections of content about a specific Gecko version.
See, here's a code sample:
var foo = someFunction(bar);
if (foo) {
foobar(foo);
} else {
alert("No foo!");
}
See? Very nifty.
- Template:fx_minversion_note
- Template:tb minversion note
Thunderbird 3 note
The
foobar()method works differently in Thunderbird 3. - Template:js_minversion_note
JavaScript 9.9 note
Here is some interesting text
Marking list items as specific to a given release
- Template:gecko minversion inline Requires Gecko 9.9
- Template:fx minversion inline
New in Firefox 9.9
- Template:tb minversion inline New in Thunderbird 3
- Template:js minversion inline
Requires JavaScript 9.9
- Template:dom_level DOM level 9.9
Nesting templates
Occasionally you might need to call one template (e.g., a bug link) in the argument to another template (e.g., a note block). Using curly braces inside the string literal does not work. Instead, use string concatenation, like this:
{{Note("Be sure to pack your own lunch because of " .. Bug(17317) .. ".")}}


Mozilla Developer Network