Difference between revisions of "Template:Eval"
Jump to navigation
Jump to search
imported>Zenexer m (Added {{intricate template}}.) |
imported>Zenexer (Only use {{{2}}} if it is set.) |
||
| Line 1: | Line 1: | ||
| − | <noinclude>{{intricate template}}<!-- Delayed evaluation created by includeonly | + | <noinclude>{{intricate template}}<!-- Delayed evaluation created by {{((}} and {{))}} (in this case manually substituted with includeonly) isn't easy to wrap one's head around. --> |
{{subst only}} | {{subst only}} | ||
| Line 8: | Line 8: | ||
-- In order to properly display the braces, they need their own includeonly tags. | -- In order to properly display the braces, they need their own includeonly tags. | ||
-- | -- | ||
| − | --></noinclude><includeonly>{{</includeonly>{{{1}}}|{{{2}}}<includeonly>}}</includeonly><noinclude><!-- | + | --></noinclude><includeonly>{{</includeonly><includeonly>{{{1}}}{{subst:#if:{{{2|}}}|{{!}}{{{2}}}}}</includeonly><includeonly>}}</includeonly><noinclude><!-- |
-- | -- | ||
-- END TEMPLATE | -- END TEMPLATE | ||
-- | -- | ||
--></noinclude> | --></noinclude> | ||
Revision as of 08:04, 10 November 2012
| 40x40px | This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
| 40x40px | This template should always be substituted (i.e., use {{subst:Eval}}). |
| 40x40px | This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
| 40x40px | This template should always be substituted (i.e., use {{subst:Eval}}). |
Evaluates a template after substitution via metatemplating. Functionally, this template generates {{template}}-style text during substitution, which then gets evaluated when the resulting code is substituted or transcluded.
Usage
{{Eval|templateName|arg1{{!}}arg2{{!}}param{{=}}paramArg}}
Arguments must be separated by {{!}}. Parameter names and their arguments must be separated by {{=}}.
See also
| The above documentation is transcluded from Template:Eval/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |