What I mean is that the whole string
... {{inner1|...|???}} ... {{inner2|...|???}} ... {{inner17|...|???}} ...
{{inner18|...|???}} ...
is passed as the first argument of
{{outer| ... |language}}
instead of being hard coded in the template {{outer| ... |language}} since
the first argument is not known in advance.
Thanks,
Daniel Forgues
On Sun, Aug 16, 2015 at 5:01 AM, <[email protected]>
wrote:
> Send Wikitext-l mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.wikimedia.org/mailman/listinfo/wikitext-l
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Wikitext-l digest..."
>
>
> Today's Topics:
>
> 1. Re: Outer templates modifying inner templates' parameters in
> nested template calls? (Arlo Breault)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 15 Aug 2015 15:30:56 -0700
> From: Arlo Breault <[email protected]>
> To: Parsoid and wikitext discussion <[email protected]>
> Subject: Re: [Wikitext-l] Outer templates modifying inner templates'
> parameters in nested template calls?
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> On Monday, July 13, 2015 at 9:02 PM, D F wrote:
> > Is there a way, or some hack, for an outer template to modify some inner
> templates' parameters in nested template calls? For example:
> >
> > {{outer| ... {{inner1|...|???}} ... {{inner2|...|???}} ...
> {{inner17|...|???}} ... {{inner18|...|???}} ... |language}}
> >
> > so that
> >
> > * if language = english, then ??? is replaced with en (before the inner
> templates are called)
> > * if language = spanish, then ??? is replaced with sp (before the inner
> templates are called)
> >
> > This way, we only have to change the language parameter of the outer
> template, and all the inner templates are called with the appropriate
> parameter. (Instead of manually modifying the numerous inner templates.)
> >
> > I know that inner templates are called before outer ones. (This would
> mean that the inner templates would execute with the ??? parameter,
> returning something that would allow the outer template to modify the ???,
> then the outer template would call back the inner templates with the
> modified parameter, before the outer template finally does it's own thing
> with the result. I don't know whether or not this could be hacked.)
> >
> Maybe I’m misunderstanding but you can pass template
> parameters as arguments to nested templates. As in,
>
> /Page
> {{aha|output=hello}}
>
> /Tempate:aha
> {{echo|{{{output}}}}}
>
> /Template:echo
> {{{1}}}
>
> The content of page will be “hello”. I used a named parameter
> so that the example is clearer; that isn’t necessary.
>
> Hope it helps.
>
>
> >
> > Thanks
> >
> > Daniel Forgues
> > _______________________________________________
> > Wikitext-l mailing list
> > [email protected] (mailto:[email protected])
> > https://lists.wikimedia.org/mailman/listinfo/wikitext-l
>
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Wikitext-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitext-l
>
>
> End of Wikitext-l Digest, Vol 53, Issue 3
> *****************************************
>
_______________________________________________
Wikitext-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitext-l