In a private Wiki. I made a simple template having 10 parameters.
With Extension:Parserfunctions, it tests the wiki page given as
its 1st parameter:
- if omitted or empty, the template does nothing, else
- if the pages exists, it yields a (blue) link to it, else
- if emits a (red) link and calls itself recursively with parameters shifted one down.
Called at the end of wiki pages, it allow one to see which
other consecutive pages are planned but not created, and to
continue reading at the next existing page. This appears
sane, imho, especially, since 10 is not a large number.
I declines work however, saying "template loop detected"
Of course, you can always "flatten" a known (max) number
of recusions, but the result is an awfully huge template,
with many duplicated lines of code.
Is there a chance to have a $wgTemplateLoopLimit installation
setting which would make MediaWiki more flexible?
I would naively recommend a default $wgTemplateLoopLimit = 2
so as to accomodate templates that document themselves with
sample calls.
If that can be had without restructuring or rewriting the parser,
I might give it a try myself.
Version: 1.17.x
Severity: enhancement