|Description||Sets the recursion depth for a template output . Change at your own risk.|
|Deprecated with||still available|
|Configuration||Query settings · Inline queries|
|Keyword||Query · Template output · Template format|
Some query printers may return wiki code that comes from other pages, .g. from templates that are used in formatting or from embedded result pages. Both kinds of pages may contain inline queries that do again use new pages, so we must care about recursion. We do so by simply counting how often this method starts a subparse and stopping at depth 2. There is one special case: if this method is called outside parsing, and the concrete printer returns wiki text, and wiki text is requested, then we may return wiki text with sub-queries to the caller. If the caller parses this (which is likely) then this will again call us in parse-context and all recursion checks catch. Only the first level of parsing is done outside and thus not counted. Thus you effectively can get down to level 3.
Note: This setting should at own risk be carefully adjusted to avoid unbalanced recursive loops.
- Information on the limitations to the template format
- Issue 41268 - Discussion on behalf of $maxRecursionDepth.