Topic on Extension talk:Include

Jump to navigation Jump to search
Summary by Quantum7

The extension can be used within templates by using the #tag:include function

Quantum7 (talkcontribs)

I would like to make a template that uses the include link. Something like

(Template:IncludeMyFile) <include src="{{{1}}}">

However, the plugin parses the include statement prior to transclusion/substitution, so the argument never gets inserted and I get an error due to "{{{1}}}" not being found.

Is there a trick to delay evaluation of the include until after transclusion?

Tacsipacsi (talkcontribs)

You can use {{#tag:include||src={{{1}}} }} (note the double pipe—the first parameter of this form must be the content of the tag which is empty for <include>).