Difference between revisions of "Template:Eval"

From blackwiki
Jump to navigation Jump to search
imported>Zenexer
(Should follow a substitution scheme)
imported>Zenexer
m (Wasn't functioning properly with nowiki; includeonly should fix it)
Line 5: Line 5:
 
-- BEGIN TEMPLATE
 
-- BEGIN TEMPLATE
 
--
 
--
--></noinclude><includeonly>{{subst:#if:{{{1|}}}|<nowiki>{{</nowiki>{{{1}}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}<nowiki>}}</nowiki>}}</includeonly><noinclude><!--
+
-- In order to properly display the braces, they need their own includeonly tags.
 +
--
 +
--></noinclude><includeonly>{{</includeonly>{{{1}}}{{!}}{{{2}}}<includeonly>}}</includeonly><noinclude><!--
 
--
 
--
 
-- END TEMPLATE
 
-- END TEMPLATE
 
--
 
--
 
--></noinclude>
 
--></noinclude>

Revision as of 01:23, 10 November 2012

50px Template documentation[view] [edit] [history] [purge]

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

Template:Metatemplate doc

Template:Metatemplate doc

{{{1}}}|{{{2}}}